Skip to content
This repository has been archived by the owner on Nov 7, 2020. It is now read-only.

Commit

Permalink
Merge pull request #3 from turanct/bugfix-return-types
Browse files Browse the repository at this point in the history
Bugfix return types
  • Loading branch information
hansott committed Oct 13, 2015
2 parents 003a0fc + 45c6691 commit 19a6d60
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
21 changes: 11 additions & 10 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions src/Pinterest/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private function execute(Request $request, callable $processor = null)
/**
* Fetches a single user and processes the response.
*
* @return Http\Response The response.
* @return Objects\User The User.
*/
private function fetchUser(Request $request)
{
Expand All @@ -114,7 +114,7 @@ private function fetchUser(Request $request)
/**
* Fetches a single board and processes the response.
*
* @return Http\Response The response.
* @return Objects\Board The Board.
*/
private function fetchBoard(Request $request)
{
Expand All @@ -128,7 +128,7 @@ private function fetchBoard(Request $request)
/**
* Fetches multiple boards and processes the response.
*
* @return Http\Response The response.
* @return PagedList[Objects\Board] A list of Boards.
*/
private function fetchMultipleBoards(Request $request)
{
Expand All @@ -142,7 +142,7 @@ private function fetchMultipleBoards(Request $request)
/**
* Fetches multiple users and processes the response.
*
* @return Http\Response The response.
* @return PagedList[Objects\User] A list of Users.
*/
private function fetchMultipleUsers(Request $request)
{
Expand All @@ -156,7 +156,7 @@ private function fetchMultipleUsers(Request $request)
/**
* Fetches multiple boards and processes the response.
*
* @return Http\Response The response.
* @return PagedList[Objects\Pin] A list of Pins.
*/
private function fetchMultiplePins(Request $request)
{
Expand All @@ -172,7 +172,7 @@ private function fetchMultiplePins(Request $request)
*
* @param $usernameOrId string The username or identifier of the user.
*
* @return Http\Response The response.
* @return Objects\User The User.
*/
public function getUser($usernameOrId)
{
Expand All @@ -187,7 +187,7 @@ public function getUser($usernameOrId)
*
* @param string $id The board identifier.
*
* @return Http\Response The response.
* @return Objects\Board The Board.
*/
public function getBoard($id)
{
Expand All @@ -199,7 +199,7 @@ public function getBoard($id)
/**
* Returns the boards of the authenticated user.
*
* @return Http\Response The response.
* @return PagedList[Objects\Board] A list of Boards.
*/
public function getUserBoards()
{
Expand All @@ -211,7 +211,7 @@ public function getUserBoards()
/**
* Returns the pins of the authenticated user.
*
* @return Http\Response The response.
* @return PagedList[Objects\Pin] A list of Likes.
*/
public function getUserLikes()
{
Expand All @@ -223,7 +223,7 @@ public function getUserLikes()
/**
* Returns the pins of the authenticated user.
*
* @return Http\Response The response.
* @return PagedList[Objects\Pin] A list of Pins.
*/
public function getUserPins()
{
Expand All @@ -235,7 +235,7 @@ public function getUserPins()
/**
* Returns the authenticated user.
*
* @return Http\Response The response.
* @return Objects\User The current User.
*/
public function getCurrentUser()
{
Expand All @@ -247,7 +247,7 @@ public function getCurrentUser()
/**
* Returns the followers of the authenticated user.
*
* @return Http\Response The response.
* @return PagedList[Objects\User] The current User's followers.
*/
public function getUserFollowers()
{
Expand All @@ -259,7 +259,7 @@ public function getUserFollowers()
/**
* Returns the boards that the authenticated user follows.
*
* @return Http\Response The response.
* @return PagedList[Objects\Board] The Boards the current user follows.
*/
public function getUserFollowingBoards()
{
Expand All @@ -271,7 +271,7 @@ public function getUserFollowingBoards()
/**
* Returns the users that the authenticated user follows.
*
* @return Http\Response The response.
* @return PagedList[Objects\User] A list of users.
*/
public function getUserFollowing()
{
Expand All @@ -283,7 +283,7 @@ public function getUserFollowing()
/**
* Returns the interests (pins) that the authenticated user follows.
*
* @return Http\Response The response.
* @return PagedList[Objects\Pin] The current User's interests.
*/
public function getUserInterests()
{
Expand All @@ -295,7 +295,7 @@ public function getUserInterests()
/**
* Follows a user.
*
* @param User $user The user to follow.
* @param User $user The user to follow.
*
* @return Http\Response The response.
*/
Expand All @@ -306,7 +306,7 @@ public function followUser(User $user)
}

$request = new Request('POST', 'me/following/users', [
'user' => $user->username
'user' => $user->username,
]);

return $this->execute($request);
Expand Down
3 changes: 1 addition & 2 deletions src/Pinterest/Http/GuzzleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ public function execute(Request $request, $token)

if ($request->isPost()) {
$this->addTokenToHeaders($headers, $token);
}
else {
} else {
$this->addToken($params, $token);
}

Expand Down
1 change: 0 additions & 1 deletion tests/ApiTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?php

use Pinterest\Api;
use Pinterest\Mapper;
use Pinterest\Objects\User;

class ApiTest extends TestCase
Expand Down

0 comments on commit 19a6d60

Please sign in to comment.