Skip to content

Fixed a load of docblocks #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Mar 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 29 additions & 25 deletions lib/Github/Api/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
use Github\HttpClient\Message\ResponseMediator;

/**
* Abstract class for Api classes
* Abstract class for Api classes.
*
* @author Joseph Bielawski <stloyd@gmail.com>
*/
abstract class AbstractApi implements ApiInterface
{
/**
* The client
* The client.
*
* @var Client
*/
protected $client;

/**
* number of items per page (GitHub pagination)
* Number of items per page (GitHub pagination).
*
* @var null|int
*/
Expand Down Expand Up @@ -59,9 +59,10 @@ public function setPerPage($perPage)
/**
* Send a GET request with query parameters.
*
* @param string $path Request path.
* @param array $parameters GET parameters.
* @param array $requestHeaders Request Headers.
* @param string $path Request path.
* @param array $parameters GET parameters.
* @param array $requestHeaders Request Headers.
*
* @return \Guzzle\Http\EntityBodyInterface|mixed|string
*/
protected function get($path, array $parameters = array(), $requestHeaders = array())
Expand All @@ -78,11 +79,12 @@ protected function get($path, array $parameters = array(), $requestHeaders = arr
}

/**
* Send a HEAD request with query parameters
* Send a HEAD request with query parameters.
*
* @param string $path Request path.
* @param array $parameters HEAD parameters.
* @param array $requestHeaders Request headers.
*
* @param string $path Request path.
* @param array $parameters HEAD parameters.
* @param array $requestHeaders Request headers.
* @return \Guzzle\Http\Message\Response
*/
protected function head($path, array $parameters = array(), $requestHeaders = array())
Expand All @@ -101,9 +103,9 @@ protected function head($path, array $parameters = array(), $requestHeaders = ar
/**
* Send a POST request with JSON-encoded parameters.
*
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
*/
protected function post($path, array $parameters = array(), $requestHeaders = array())
{
Expand All @@ -117,9 +119,10 @@ protected function post($path, array $parameters = array(), $requestHeaders = ar
/**
* Send a POST request with raw data.
*
* @param string $path Request path.
* @param string $path Request path.
* @param $body Request body.
* @param array $requestHeaders Request headers.
* @param array $requestHeaders Request headers.
*
* @return \Guzzle\Http\EntityBodyInterface|mixed|string
*/
protected function postRaw($path, $body, $requestHeaders = array())
Expand All @@ -136,9 +139,9 @@ protected function postRaw($path, $body, $requestHeaders = array())
/**
* Send a PATCH request with JSON-encoded parameters.
*
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
*/
protected function patch($path, array $parameters = array(), $requestHeaders = array())
{
Expand All @@ -154,9 +157,9 @@ protected function patch($path, array $parameters = array(), $requestHeaders = a
/**
* Send a PUT request with JSON-encoded parameters.
*
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
*/
protected function put($path, array $parameters = array(), $requestHeaders = array())
{
Expand All @@ -172,9 +175,9 @@ protected function put($path, array $parameters = array(), $requestHeaders = arr
/**
* Send a DELETE request with JSON-encoded parameters.
*
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
* @param string $path Request path.
* @param array $parameters POST parameters to be JSON encoded.
* @param array $requestHeaders Request headers.
*/
protected function delete($path, array $parameters = array(), $requestHeaders = array())
{
Expand All @@ -190,7 +193,8 @@ protected function delete($path, array $parameters = array(), $requestHeaders =
/**
* Create a JSON encoded version of an array of parameters.
*
* @param array $parameters Request parameters
* @param array $parameters Request parameters
*
* @return null|string
*/
protected function createJsonBody(array $parameters)
Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Api/ApiInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Github\Api;

/**
* Api interface
* Api interface.
*
* @author Joseph Bielawski <stloyd@gmail.com>
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Api/Authorizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Github\Api\AbstractApi;

/**
* Creating, deleting and listing authorizations
* Creating, deleting and listing authorizations.
*
* @link http://developer.github.com/v3/oauth/
*/
Expand Down
14 changes: 7 additions & 7 deletions lib/Github/Api/CurrentUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @link http://developer.github.com/v3/users/
* @author Joseph Bielawski <stloyd@gmail.com>
* @revised Felipe Valtl de Mello <eu@felipe.im>
* @author Felipe Valtl de Mello <eu@felipe.im>
*/
class CurrentUser extends AbstractApi
{
Expand Down Expand Up @@ -52,8 +52,8 @@ public function followers($page = 1)
/**
* @link http://developer.github.com/v3/issues/#list-issues
*
* @param array $params
* @param boolean $includeOrgIssues
* @param array $params
* @param bool $includeOrgIssues
*
* @return array
*/
Expand Down Expand Up @@ -101,10 +101,10 @@ public function teams()
/**
* @link http://developer.github.com/v3/repos/#list-your-repositories
*
* @param string $type role in the repository
* @param string $sort sort by
* @param string $direction direction of sort, ask or desc

* @param string $type role in the repository
* @param string $sort sort by
* @param string $direction direction of sort, ask or desc
*
* @return array
*/
public function repositories($type = 'owner', $sort = 'full_name', $direction = 'asc')
Expand Down
33 changes: 21 additions & 12 deletions lib/Github/Api/CurrentUser/DeployKeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
class DeployKeys extends AbstractApi
{
/**
* List deploy keys for the authenticated user
* List deploy keys for the authenticated user.
*
* @link http://developer.github.com/v3/repos/keys/
*
* @return array
Expand All @@ -23,10 +24,12 @@ public function all()
}

/**
* Shows deploy key for the authenticated user
* Shows deploy key for the authenticated user.
*
* @link http://developer.github.com/v3/repos/keys/
*
* @param string $id
* @param string $id
*
* @return array
*/
public function show($id)
Expand All @@ -35,13 +38,15 @@ public function show($id)
}

/**
* Adds deploy key for the authenticated user
* Adds deploy key for the authenticated user.
*
* @link http://developer.github.com/v3/repos/keys/
*
* @param array $params
* @return array
* @param array $params
*
* @throws MissingArgumentException
*
* @return array
*/
public function create(array $params)
{
Expand All @@ -53,14 +58,16 @@ public function create(array $params)
}

/**
* Updates deploy key for the authenticated user
* Updates deploy key for the authenticated user.
*
* @link http://developer.github.com/v3/repos/keys/
*
* @param string $id
* @param array $params
* @return array
* @param string $id
* @param array $params
*
* @throws MissingArgumentException
*
* @return array
*/
public function update($id, array $params)
{
Expand All @@ -72,10 +79,12 @@ public function update($id, array $params)
}

/**
* Removes deploy key for the authenticated user
* Removes deploy key for the authenticated user.
*
* @link http://developer.github.com/v3/repos/keys/
*
* @param string $id
* @param string $id
*
* @return array
*/
public function remove($id)
Expand Down
19 changes: 12 additions & 7 deletions lib/Github/Api/CurrentUser/Emails.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
class Emails extends AbstractApi
{
/**
* List emails for the authenticated user
* List emails for the authenticated user.
*
* @link http://developer.github.com/v3/users/emails/
*
* @return array
Expand All @@ -23,13 +24,15 @@ public function all()
}

/**
* Adds one or more email for the authenticated user
* Adds one or more email for the authenticated user.
*
* @link http://developer.github.com/v3/users/emails/
*
* @param string|array $emails
* @return array
* @param string|array $emails
*
* @throws InvalidArgumentException
*
* @return array
*/
public function add($emails)
{
Expand All @@ -43,13 +46,15 @@ public function add($emails)
}

/**
* Removes one or more email for the authenticated user
* Removes one or more email for the authenticated user.
*
* @link http://developer.github.com/v3/users/emails/
*
* @param string|array $emails
* @return array
* @param string|array $emails
*
* @throws InvalidArgumentException
*
* @return array
*/
public function remove($emails)
{
Expand Down
24 changes: 16 additions & 8 deletions lib/Github/Api/CurrentUser/Followers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
class Followers extends AbstractApi
{
/**
* List followed users by the authenticated user
* List followed users by the authenticated user.
*
* @link http://developer.github.com/v3/repos/followers/
*
* @param integer $page
* @param int $page
*
* @return array
*/
public function all($page = 1)
Expand All @@ -25,10 +27,12 @@ public function all($page = 1)
}

/**
* Check that the authenticated user follows a user
* Check that the authenticated user follows a user.
*
* @link http://developer.github.com/v3/repos/followers/
*
* @param string $username the username to follow
* @param string $username the username to follow
*
* @return array
*/
public function check($username)
Expand All @@ -37,10 +41,12 @@ public function check($username)
}

/**
* Make the authenticated user follow a user
* Make the authenticated user follow a user.
*
* @link http://developer.github.com/v3/repos/followers/
*
* @param string $username the username to follow
* @param string $username the username to follow
*
* @return array
*/
public function follow($username)
Expand All @@ -49,10 +55,12 @@ public function follow($username)
}

/**
* Make the authenticated user un-follow a user
* Make the authenticated user un-follow a user.
*
* @link http://developer.github.com/v3/repos/followers/
*
* @param string $username the username to un-follow
* @param string $username the username to un-follow
*
* @return array
*/
public function unfollow($username)
Expand Down
Loading