From c659249e7a1ba5fc009baed8f2cc3341c8bde726 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sun, 1 Mar 2015 10:08:08 +0000 Subject: [PATCH] Fixed a load of docblocks --- lib/Github/Api/AbstractApi.php | 54 +++++---- lib/Github/Api/ApiInterface.php | 2 +- lib/Github/Api/Authorizations.php | 2 +- lib/Github/Api/CurrentUser.php | 14 +-- lib/Github/Api/CurrentUser/DeployKeys.php | 33 ++++-- lib/Github/Api/CurrentUser/Emails.php | 19 +-- lib/Github/Api/CurrentUser/Followers.php | 24 ++-- lib/Github/Api/CurrentUser/Notifications.php | 45 ++++--- lib/Github/Api/CurrentUser/Starring.php | 30 +++-- lib/Github/Api/CurrentUser/Watchers.php | 30 +++-- lib/Github/Api/Enterprise/License.php | 1 + .../Api/Enterprise/ManagementConsole.php | 11 +- lib/Github/Api/Enterprise/Stats.php | 22 ++-- lib/Github/Api/Enterprise/UserAdmin.php | 4 +- lib/Github/Api/Gists.php | 4 +- lib/Github/Api/Issue.php | 64 ++++++---- lib/Github/Api/Markdown.php | 2 +- lib/Github/Api/Meta.php | 4 +- lib/Github/Api/Notification.php | 4 +- lib/Github/Api/Organization.php | 6 +- lib/Github/Api/PullRequest.php | 15 ++- lib/Github/Api/Repo.php | 112 +++++++++++------- lib/Github/Api/Repository/Assets.php | 49 ++++---- lib/Github/Api/Repository/Contents.php | 33 ++++-- lib/Github/Api/Repository/Downloads.php | 21 ++-- lib/Github/Api/Repository/Releases.php | 40 +++---- lib/Github/Api/Repository/Statuses.php | 4 +- lib/Github/Api/Search.php | 36 +++--- lib/Github/Api/User.php | 101 ++++++++++------ lib/Github/Client.php | 24 ++-- .../Exception/ApiLimitExceedException.php | 2 +- .../Exception/BadMethodCallException.php | 2 +- lib/Github/Exception/ErrorException.php | 2 +- .../Exception/InvalidArgumentException.php | 2 +- .../Exception/MissingArgumentException.php | 2 +- lib/Github/Exception/RuntimeException.php | 2 +- .../Exception/ValidationFailedException.php | 2 +- .../HttpClient/Cache/CacheInterface.php | 8 +- .../HttpClient/Cache/GaufretteCache.php | 2 +- lib/Github/HttpClient/CachedHttpClient.php | 18 +-- lib/Github/HttpClient/HttpClient.php | 2 +- lib/Github/HttpClient/HttpClientInterface.php | 41 +++---- lib/Github/ResultPager.php | 21 ++-- lib/Github/ResultPagerInterface.php | 32 +++-- test/Github/Tests/Api/CurrentUserTest.php | 2 +- .../Github/Tests/Api/Enterprise/StatsTest.php | 1 + test/Github/Tests/ResultPagerTest.php | 2 +- 47 files changed, 558 insertions(+), 395 deletions(-) diff --git a/lib/Github/Api/AbstractApi.php b/lib/Github/Api/AbstractApi.php index 724aaf44b35..e7209936ea5 100644 --- a/lib/Github/Api/AbstractApi.php +++ b/lib/Github/Api/AbstractApi.php @@ -6,21 +6,21 @@ use Github\HttpClient\Message\ResponseMediator; /** - * Abstract class for Api classes + * Abstract class for Api classes. * * @author Joseph Bielawski */ 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 */ @@ -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()) @@ -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()) @@ -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()) { @@ -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()) @@ -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()) { @@ -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()) { @@ -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()) { @@ -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) diff --git a/lib/Github/Api/ApiInterface.php b/lib/Github/Api/ApiInterface.php index d55fe8fe0f3..893f538e1ab 100644 --- a/lib/Github/Api/ApiInterface.php +++ b/lib/Github/Api/ApiInterface.php @@ -3,7 +3,7 @@ namespace Github\Api; /** - * Api interface + * Api interface. * * @author Joseph Bielawski */ diff --git a/lib/Github/Api/Authorizations.php b/lib/Github/Api/Authorizations.php index 68f9414fd0c..014e08b4486 100644 --- a/lib/Github/Api/Authorizations.php +++ b/lib/Github/Api/Authorizations.php @@ -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/ */ diff --git a/lib/Github/Api/CurrentUser.php b/lib/Github/Api/CurrentUser.php index 5b21a41d175..3ab571d47fe 100644 --- a/lib/Github/Api/CurrentUser.php +++ b/lib/Github/Api/CurrentUser.php @@ -12,7 +12,7 @@ /** * @link http://developer.github.com/v3/users/ * @author Joseph Bielawski - * @revised Felipe Valtl de Mello + * @author Felipe Valtl de Mello */ class CurrentUser extends AbstractApi { @@ -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 */ @@ -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') diff --git a/lib/Github/Api/CurrentUser/DeployKeys.php b/lib/Github/Api/CurrentUser/DeployKeys.php index 87a0eaed843..d4f8b080d77 100644 --- a/lib/Github/Api/CurrentUser/DeployKeys.php +++ b/lib/Github/Api/CurrentUser/DeployKeys.php @@ -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 @@ -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) @@ -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) { @@ -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) { @@ -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) diff --git a/lib/Github/Api/CurrentUser/Emails.php b/lib/Github/Api/CurrentUser/Emails.php index ec8c78d5986..587aa12c744 100644 --- a/lib/Github/Api/CurrentUser/Emails.php +++ b/lib/Github/Api/CurrentUser/Emails.php @@ -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 @@ -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) { @@ -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) { diff --git a/lib/Github/Api/CurrentUser/Followers.php b/lib/Github/Api/CurrentUser/Followers.php index ea356d85e32..303637740cc 100644 --- a/lib/Github/Api/CurrentUser/Followers.php +++ b/lib/Github/Api/CurrentUser/Followers.php @@ -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) @@ -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) @@ -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) @@ -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) diff --git a/lib/Github/Api/CurrentUser/Notifications.php b/lib/Github/Api/CurrentUser/Notifications.php index a35519df783..92dc0a570c9 100644 --- a/lib/Github/Api/CurrentUser/Notifications.php +++ b/lib/Github/Api/CurrentUser/Notifications.php @@ -11,10 +11,12 @@ class Notifications extends AbstractApi { /** - * List all notifications for the authenticated user + * List all notifications for the authenticated user. + * * @link http://developer.github.com/v3/activity/notifications/#list-your-notifications * - * @param array $params + * @param array $params + * * @return array */ public function all(array $params = array()) @@ -23,12 +25,14 @@ public function all(array $params = array()) } /** - * List all notifications for the authenticated user in selected repository + * List all notifications for the authenticated user in selected repository. + * * @link http://developer.github.com/v3/activity/notifications/#list-your-notifications-in-a-repository * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param array $params + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param array $params + * * @return array */ public function allInRepository($username, $repository, array $params = array()) @@ -39,7 +43,8 @@ public function allInRepository($username, $repository, array $params = array()) /** * @link http://developer.github.com/v3/activity/notifications/#mark-as-read * - * @param array $params + * @param array $params + * * @return array */ public function markAsReadAll(array $params = array()) @@ -50,9 +55,10 @@ public function markAsReadAll(array $params = array()) /** * @link http://developer.github.com/v3/activity/notifications/#mark-notifications-as-read-in-a-repository * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param array $params + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param array $params + * * @return array */ public function markAsReadInRepository($username, $repository, array $params = array()) @@ -63,8 +69,9 @@ public function markAsReadInRepository($username, $repository, array $params = a /** * @link http://developer.github.com/v3/activity/notifications/#mark-a-thread-as-read * - * @param string $id the notification number - * @param array $params + * @param string $id the notification number + * @param array $params + * * @return array */ public function markAsRead($id, array $params) @@ -75,7 +82,8 @@ public function markAsRead($id, array $params) /** * @link http://developer.github.com/v3/activity/notifications/#view-a-single-thread * - * @param string $id the notification number + * @param string $id the notification number + * * @return array */ public function show($id) @@ -86,7 +94,8 @@ public function show($id) /** * @link http://developer.github.com/v3/activity/notifications/#get-a-thread-subscription * - * @param string $id the notification number + * @param string $id the notification number + * * @return array */ public function showSubscription($id) @@ -97,8 +106,9 @@ public function showSubscription($id) /** * @link http://developer.github.com/v3/activity/notifications/#set-a-thread-subscription * - * @param string $id the notification number - * @param array $params + * @param string $id the notification number + * @param array $params + * * @return array */ public function createSubscription($id, array $params) @@ -109,7 +119,8 @@ public function createSubscription($id, array $params) /** * @link http://developer.github.com/v3/activity/notifications/#delete-a-thread-subscription * - * @param string $id the notification number + * @param string $id the notification number + * * @return array */ public function removeSubscription($id) diff --git a/lib/Github/Api/CurrentUser/Starring.php b/lib/Github/Api/CurrentUser/Starring.php index 97e0b017c9b..0e75da2c576 100644 --- a/lib/Github/Api/CurrentUser/Starring.php +++ b/lib/Github/Api/CurrentUser/Starring.php @@ -11,10 +11,12 @@ class Starring extends AbstractApi { /** - * List repositories starred by the authenticated user + * List repositories starred by the authenticated user. + * * @link https://developer.github.com/v3/activity/starring/ * - * @param integer $page + * @param int $page + * * @return array */ public function all($page = 1) @@ -25,11 +27,13 @@ public function all($page = 1) } /** - * Check that the authenticated user starres a repository + * Check that the authenticated user starres a repository. + * * @link https://developer.github.com/v3/activity/starring/ * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function check($username, $repository) @@ -38,11 +42,13 @@ public function check($username, $repository) } /** - * Make the authenticated user star a repository + * Make the authenticated user star a repository. + * * @link https://developer.github.com/v3/activity/starring/ * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function star($username, $repository) @@ -51,11 +57,13 @@ public function star($username, $repository) } /** - * Make the authenticated user unstar a repository + * Make the authenticated user unstar a repository. + * * @link https://developer.github.com/v3/activity/starring * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function unstar($username, $repository) diff --git a/lib/Github/Api/CurrentUser/Watchers.php b/lib/Github/Api/CurrentUser/Watchers.php index 035b78f568e..7f7b55457b5 100644 --- a/lib/Github/Api/CurrentUser/Watchers.php +++ b/lib/Github/Api/CurrentUser/Watchers.php @@ -12,10 +12,12 @@ class Watchers extends AbstractApi { /** - * List repositories watched by the authenticated user + * List repositories watched by the authenticated user. + * * @link https://developer.github.com/v3/activity/watching/ * - * @param integer $page + * @param int $page + * * @return array */ public function all($page = 1) @@ -26,11 +28,13 @@ public function all($page = 1) } /** - * Check that the authenticated user watches a repository + * Check that the authenticated user watches a repository. + * * @link https://developer.github.com/v3/activity/watching/ * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function check($username, $repository) @@ -39,11 +43,13 @@ public function check($username, $repository) } /** - * Make the authenticated user watch a repository + * Make the authenticated user watch a repository. + * * @link https://developer.github.com/v3/activity/watching/ * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function watch($username, $repository) @@ -52,11 +58,13 @@ public function watch($username, $repository) } /** - * Make the authenticated user unwatch a repository + * Make the authenticated user unwatch a repository. + * * @link https://developer.github.com/v3/activity/watching/ * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * * @return array */ public function unwatch($username, $repository) diff --git a/lib/Github/Api/Enterprise/License.php b/lib/Github/Api/Enterprise/License.php index 27785ca14e3..de14f23eac3 100644 --- a/lib/Github/Api/Enterprise/License.php +++ b/lib/Github/Api/Enterprise/License.php @@ -8,6 +8,7 @@ class License extends AbstractApi { /** * Provides information about your Enterprise license (only available to site admins). + * * @link https://developer.github.com/v3/enterprise/license/ * * @return array array of license information diff --git a/lib/Github/Api/Enterprise/ManagementConsole.php b/lib/Github/Api/Enterprise/ManagementConsole.php index 59315b45478..8554425f365 100644 --- a/lib/Github/Api/Enterprise/ManagementConsole.php +++ b/lib/Github/Api/Enterprise/ManagementConsole.php @@ -8,9 +8,11 @@ class ManagementConsole extends AbstractApi { /** * Checks the status of your installation’s most recent configuration process. + * * @link https://developer.github.com/v3/enterprise/management_console/#check-configuration-status * * @param string $hash md5 hash of your license + * * @return array array of configuration status information */ public function configcheck($hash) @@ -20,9 +22,11 @@ public function configcheck($hash) /** * Retrieves your installation’s settings. + * * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-settings * * @param string $hash md5 hash of your license + * * @return array array of settings */ public function settings($hash) @@ -32,9 +36,11 @@ public function settings($hash) /** * Checks your installation’s maintenance status. + * * @link https://developer.github.com/v3/enterprise/management_console/#check-maintenance-status * * @param string $hash md5 hash of your license + * * @return array array of maintenance status information */ public function maintenance($hash) @@ -44,9 +50,11 @@ public function maintenance($hash) /** * Retrieves your installation’s authorized SSH keys. + * * @link https://developer.github.com/v3/enterprise/management_console/#retrieve-authorized-ssh-keys * * @param string $hash md5 hash of your license + * * @return array array of authorized keys */ public function keys($hash) @@ -57,8 +65,9 @@ public function keys($hash) /** * Sends an authenticated GET request. * - * @param string $uri the request URI + * @param string $uri the request URI * @param string $hash md5 hash of your license + * * @return \Guzzle\Http\EntityBodyInterface|mixed|string */ protected function getWithLicenseHash($uri, $hash) diff --git a/lib/Github/Api/Enterprise/Stats.php b/lib/Github/Api/Enterprise/Stats.php index 934401b769c..7af932945a7 100644 --- a/lib/Github/Api/Enterprise/Stats.php +++ b/lib/Github/Api/Enterprise/Stats.php @@ -7,7 +7,7 @@ class Stats extends AbstractApi { /** - * Returns the number of open and closed issues + * Returns the number of open and closed issues. * * @return array array with totals of open and closed issues */ @@ -17,7 +17,7 @@ public function issues() } /** - * Returns the number of active and inactive hooks + * Returns the number of active and inactive hooks. * * @return array array with totals of active and inactive hooks */ @@ -27,7 +27,7 @@ public function hooks() } /** - * Returns the number of open and closed milestones + * Returns the number of open and closed milestones. * * @return array array with totals of open and closed milestones */ @@ -37,7 +37,7 @@ public function milestones() } /** - * Returns the number of organizations, teams, team members, and disabled organizations + * Returns the number of organizations, teams, team members, and disabled organizations. * * @return array array with totals of organizations, teams, team members, and disabled organizations */ @@ -47,7 +47,7 @@ public function orgs() } /** - * Returns the number of comments on issues, pull requests, commits, and gists + * Returns the number of comments on issues, pull requests, commits, and gists. * * @return array array with totals of comments on issues, pull requests, commits, and gists */ @@ -57,7 +57,7 @@ public function comments() } /** - * Returns the number of GitHub Pages sites + * Returns the number of GitHub Pages sites. * * @return array array with totals of GitHub Pages sites */ @@ -67,7 +67,7 @@ public function pages() } /** - * Returns the number of suspended and admin users + * Returns the number of suspended and admin users. * * @return array array with totals of suspended and admin users */ @@ -77,7 +77,7 @@ public function users() } /** - * Returns the number of private and public gists + * Returns the number of private and public gists. * * @return array array with totals of private and public gists */ @@ -87,7 +87,7 @@ public function gists() } /** - * Returns the number of merged, mergeable, and unmergeable pull requests + * Returns the number of merged, mergeable, and unmergeable pull requests. * * @return array array with totals of merged, mergeable, and unmergeable pull requests */ @@ -97,7 +97,7 @@ public function pulls() } /** - * Returns the number of organization-owned repositories, root repositories, forks, pushed commits, and wikis + * Returns the number of organization-owned repositories, root repositories, forks, pushed commits, and wikis. * * @return array array with totals of organization-owned repositories, root repositories, forks, pushed commits, and wikis */ @@ -107,7 +107,7 @@ public function repos() } /** - * Returns all of the statistics + * Returns all of the statistics. * * @return array array with all of the statistics */ diff --git a/lib/Github/Api/Enterprise/UserAdmin.php b/lib/Github/Api/Enterprise/UserAdmin.php index d01a975515c..5a14114bca2 100644 --- a/lib/Github/Api/Enterprise/UserAdmin.php +++ b/lib/Github/Api/Enterprise/UserAdmin.php @@ -7,7 +7,7 @@ class UserAdmin extends AbstractApi { /** - * Suspend a user + * Suspend a user. * * @link https://developer.github.com/v3/users/administration/#suspend-a-user * @@ -21,7 +21,7 @@ public function suspend($username) } /** - * Unsuspend a user + * Unsuspend a user. * * @link https://developer.github.com/v3/users/administration/#unsuspend-a-user * diff --git a/lib/Github/Api/Gists.php b/lib/Github/Api/Gists.php index ffdc5e3201e..12fe9ec5d00 100644 --- a/lib/Github/Api/Gists.php +++ b/lib/Github/Api/Gists.php @@ -6,7 +6,7 @@ use Github\Exception\MissingArgumentException; /** - * Creating, editing, deleting and listing gists + * Creating, editing, deleting and listing gists. * * @link http://developer.github.com/v3/gists/ * @author Joseph Bielawski @@ -34,7 +34,7 @@ public function create(array $params) throw new MissingArgumentException('files'); } - $params['public'] = (boolean) $params['public']; + $params['public'] = (bool) $params['public']; return $this->post('gists', $params); } diff --git a/lib/Github/Api/Issue.php b/lib/Github/Api/Issue.php index c4aae96e994..c1b9a6e7992 100644 --- a/lib/Github/Api/Issue.php +++ b/lib/Github/Api/Issue.php @@ -12,19 +12,22 @@ * Listing issues, searching, editing and closing your projects issues. * * @link http://develop.github.com/p/issues.html + * * @author Thibault Duplessis * @author Joseph Bielawski */ class Issue extends AbstractApi { /** - * List issues by username, repo and state + * List issues by username, repo and state. + * * @link http://developer.github.com/v3/issues/ * - * @param string $username the username - * @param string $repository the repository - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * @return array list of issues found + * @param string $username the username + * @param string $repository the repository + * @param array $params the additional parameters like milestone, assignees, labels, sort, direction + * + * @return array list of issues found */ public function all($username, $repository, array $params = array()) { @@ -32,7 +35,8 @@ public function all($username, $repository, array $params = array()) } /** - * Search issues by username, repo, state and keyword + * Search issues by username, repo, state and keyword. + * * @link http://developer.github.com/v3/search/#search-issues * * @param string $username the username @@ -52,13 +56,15 @@ public function find($username, $repository, $state, $keyword) } /** - * List issues by organization + * List issues by organization. + * * @link http://developer.github.com/v3/issues/ * - * @param string $organization the organization - * @param string $state the issue state, can be open or closed - * @param array $params the additional parameters like milestone, assignees, labels, sort, direction - * @return array list of issues found + * @param string $organization the organization + * @param string $state the issue state, can be open or closed + * @param array $params the additional parameters like milestone, assignees, labels, sort, direction + * + * @return array list of issues found */ public function org($organization, $state, array $params = array()) { @@ -70,13 +76,15 @@ public function org($organization, $state, array $params = array()) } /** - * Get extended information about an issue by its username, repo and number + * Get extended information about an issue by its username, repo and number. + * * @link http://developer.github.com/v3/issues/ * - * @param string $username the username - * @param string $repository the repository - * @param string $id the issue number - * @return array information about the issue + * @param string $username the username + * @param string $repository the repository + * @param string $id the issue number + * + * @return array information about the issue */ public function show($username, $repository, $id) { @@ -86,14 +94,16 @@ public function show($username, $repository, $id) /** * Create a new issue for the given username and repo. * The issue is assigned to the authenticated user. Requires authentication. + * * @link http://developer.github.com/v3/issues/ * - * @param string $username the username - * @param string $repository the repository - * @param array $params the new issue data - * @return array information about the issue + * @param string $username the username + * @param string $repository the repository + * @param array $params the new issue data * * @throws MissingArgumentException + * + * @return array information about the issue */ public function create($username, $repository, array $params) { @@ -106,6 +116,7 @@ public function create($username, $repository, array $params) /** * Update issue information's by username, repo and issue number. Requires authentication. + * * @link http://developer.github.com/v3/issues/ * * @param string $username the username @@ -113,6 +124,7 @@ public function create($username, $repository, array $params) * @param string $id the issue number * @param array $params key=>value user attributes to update. * key can be title or body + * * @return array information about the issue */ public function update($username, $repository, $id, array $params) @@ -121,7 +133,8 @@ public function update($username, $repository, $id, array $params) } /** - * List an issue comments + * List an issue comments. + * * @link http://developer.github.com/v3/issues/comments/ * * @return Comments @@ -132,7 +145,8 @@ public function comments() } /** - * List all project events + * List all project events. + * * @link http://developer.github.com/v3/issues/events/ * * @return Events @@ -143,7 +157,8 @@ public function events() } /** - * List all project labels + * List all project labels. + * * @link http://developer.github.com/v3/issues/labels/ * * @return Labels @@ -154,7 +169,8 @@ public function labels() } /** - * List all project milestones + * List all project milestones. + * * @link http://developer.github.com/v3/issues/milestones/ * * @return Milestones diff --git a/lib/Github/Api/Markdown.php b/lib/Github/Api/Markdown.php index 8620ee86757..f97a142df5f 100644 --- a/lib/Github/Api/Markdown.php +++ b/lib/Github/Api/Markdown.php @@ -3,7 +3,7 @@ namespace Github\Api; /** - * Markdown Rendering API + * Markdown Rendering API. * * @link http://developer.github.com/v3/markdown/ * @author Joseph Bielawski diff --git a/lib/Github/Api/Meta.php b/lib/Github/Api/Meta.php index a10c1361b12..73a43301f9e 100644 --- a/lib/Github/Api/Meta.php +++ b/lib/Github/Api/Meta.php @@ -3,7 +3,7 @@ namespace Github\Api; /** - * Getting GitHub service information + * Getting GitHub service information. * * @link https://developer.github.com/v3/meta/ * @author Claude Dioudonnat @@ -11,7 +11,7 @@ class Meta extends AbstractApi { /** - * Get the ip address of the hook and git servers for the GitHub.com service + * Get the ip address of the hook and git servers for the GitHub.com service. * * @return array Informations about the service of GitHub.com */ diff --git a/lib/Github/Api/Notification.php b/lib/Github/Api/Notification.php index 75831137df3..c351927ec5d 100644 --- a/lib/Github/Api/Notification.php +++ b/lib/Github/Api/Notification.php @@ -15,7 +15,7 @@ class Notification extends AbstractApi { /** - * Get a listing of notifications + * Get a listing of notifications. * * @link https://developer.github.com/v3/activity/notifications/ * @@ -41,7 +41,7 @@ public function all($includingRead = false, $participating = false, DateTime $si /** * Marks all notifications as read from the current date - * Optionally give DateTime to mark as read before that date + * Optionally give DateTime to mark as read before that date. * * @link https://developer.github.com/v3/activity/notifications/#mark-as-read * diff --git a/lib/Github/Api/Organization.php b/lib/Github/Api/Organization.php index da46badcfcd..37322b218d8 100644 --- a/lib/Github/Api/Organization.php +++ b/lib/Github/Api/Organization.php @@ -15,7 +15,8 @@ class Organization extends AbstractApi { /** - * Get extended information about an organization by its name + * Get extended information about an organization by its name. + * * @link http://developer.github.com/v3/orgs/#get * * @param string $organization the organization to show @@ -33,7 +34,8 @@ public function update($organization, array $params) } /** - * List all repositories across all the organizations that you can access + * List all repositories across all the organizations that you can access. + * * @link http://developer.github.com/v3/repos/#list-organization-repositories * * @param string $organization the user name diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index 5151f1cd105..1af5778284c 100755 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -15,11 +15,12 @@ class PullRequest extends AbstractApi { /** * Get a listing of a project's pull requests by the username, repository and (optionally) state. + * * @link http://developer.github.com/v3/pulls/ * - * @param string $username the username - * @param string $repository the repository - * @param array $params a list of extra parameters. + * @param string $username the username + * @param string $repository the repository + * @param array $params a list of extra parameters. * * @return array array of pull requests for the project */ @@ -35,6 +36,7 @@ public function all($username, $repository, array $params = array()) /** * Show all details of a pull request, including the discussions. + * * @link http://developer.github.com/v3/pulls/ * * @param string $username the username @@ -64,7 +66,8 @@ public function comments() } /** - * Create a pull request + * Create a pull request. + * * @link http://developer.github.com/v3/pulls/ * * @param string $username the username @@ -75,9 +78,9 @@ public function comments() * "my-user:some-branch". The String title of the Pull Request. The String body of * the Pull Request. The issue number. Used when title and body is not set. * - * @return array - * * @throws MissingArgumentException + * + * @return array */ public function create($username, $repository, array $params) { diff --git a/lib/Github/Api/Repo.php b/lib/Github/Api/Repo.php index 8cab5b4d13c..fcafd4b2517 100644 --- a/lib/Github/Api/Repo.php +++ b/lib/Github/Api/Repo.php @@ -25,7 +25,8 @@ class Repo extends AbstractApi { /** - * Search repositories by keyword: + * Search repositories by keyword. + * * @link http://developer.github.com/v3/search/#search-repositories * * @param string $keyword the search query @@ -39,7 +40,8 @@ public function find($keyword, array $params = array()) } /** - * Get the last year of commit activity for a repository grouped by week + * Get the last year of commit activity for a repository grouped by week. + * * @link http://developer.github.com/v3/repos/statistics/#commit-activity * * @param string $username the user who owns the repository @@ -53,7 +55,8 @@ public function activity($username, $repository) } /** - * Get contributor commit statistics for a repository + * Get contributor commit statistics for a repository. + * * @link http://developer.github.com/v3/repos/statistics/#contributors * * @param string $username the user who owns the repository @@ -67,7 +70,8 @@ public function statistics($username, $repository) } /** - * List all repositories for an organization + * List all repositories for an organization. + * * @link http://developer.github.com/v3/repos/#list-organization-repositories * * @param string $organization the name of the organization @@ -81,7 +85,8 @@ public function org($organization, array $params = array()) } /** - * Get extended information about a repository by its username and repository name + * Get extended information about a repository by its username and repository name. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repository @@ -95,19 +100,20 @@ public function show($username, $repository) } /** - * Create repository + * Create repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $name name of the repository * @param string $description repository description * @param string $homepage homepage url - * @param boolean $public `true` for public, `false` for private + * @param bool $public `true` for public, `false` for private * @param null|string $organization username of organization if applicable - * @param boolean $hasIssues `true` to enable issues for this repository, `false` to disable them - * @param boolean $hasWiki `true` to enable the wiki for this repository, `false` to disable it - * @param boolean $hasDownloads `true` to enable downloads for this repository, `false` to disable them - * @param integer $teamId The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization. - * @param boolean $autoInit `true` to create an initial commit with empty README, `false` for no initial commit + * @param bool $hasIssues `true` to enable issues for this repository, `false` to disable them + * @param bool $hasWiki `true` to enable the wiki for this repository, `false` to disable it + * @param bool $hasDownloads `true` to enable downloads for this repository, `false` to disable them + * @param int $teamId The id of the team that will be granted access to this repository. This is only valid when creating a repo in an organization. + * @param bool $autoInit `true` to create an initial commit with empty README, `false` for no initial commit * * @return array returns repository data */ @@ -144,7 +150,8 @@ public function create( } /** - * Set information of a repository + * Set information of a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repository @@ -159,7 +166,8 @@ public function update($username, $repository, array $values) } /** - * Delete a repository + * Delete a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repository @@ -173,7 +181,8 @@ public function remove($username, $repository) } /** - * Get the readme content for a repository by its username and repository name + * Get the readme content for a repository by its username and repository name. + * * @link http://developer.github.com/v3/repos/contents/#get-the-readme * * @param string $username the user who owns the repository @@ -187,7 +196,8 @@ public function readme($username, $repository) } /** - * Manage the collaborators of a repository + * Manage the collaborators of a repository. + * * @link http://developer.github.com/v3/repos/collaborators/ * * @return Collaborators @@ -198,7 +208,8 @@ public function collaborators() } /** - * Manage the comments of a repository + * Manage the comments of a repository. + * * @link http://developer.github.com/v3/repos/comments/ * * @return Comments @@ -209,7 +220,8 @@ public function comments() } /** - * Manage the commits of a repository + * Manage the commits of a repository. + * * @link http://developer.github.com/v3/repos/commits/ * * @return Commits @@ -220,7 +232,8 @@ public function commits() } /** - * Manage the content of a repository + * Manage the content of a repository. + * * @link http://developer.github.com/v3/repos/contents/ * * @return Contents @@ -231,7 +244,8 @@ public function contents() } /** - * Manage the content of a repository + * Manage the content of a repository. + * * @link http://developer.github.com/v3/repos/downloads/ * * @return Downloads @@ -242,7 +256,8 @@ public function downloads() } /** - * Manage the releases of a repository (Currently Undocumented) + * Manage the releases of a repository (Currently Undocumented). + * * @link http://developer.github.com/v3/repos/ * * @return Releases @@ -253,7 +268,8 @@ public function releases() } /** - * Manage the deploy keys of a repository + * Manage the deploy keys of a repository. + * * @link http://developer.github.com/v3/repos/keys/ * * @return DeployKeys @@ -264,7 +280,8 @@ public function keys() } /** - * Manage the forks of a repository + * Manage the forks of a repository. + * * @link http://developer.github.com/v3/repos/forks/ * * @return Forks @@ -275,7 +292,8 @@ public function forks() } /** - * Manage the hooks of a repository + * Manage the hooks of a repository. + * * @link http://developer.github.com/v3/issues/jooks/ * * @return Hooks @@ -286,7 +304,8 @@ public function hooks() } /** - * Manage the labels of a repository + * Manage the labels of a repository. + * * @link http://developer.github.com/v3/issues/labels/ * * @return Labels @@ -297,7 +316,8 @@ public function labels() } /** - * Manage the statuses of a repository + * Manage the statuses of a repository. + * * @link http://developer.github.com/v3/repos/statuses/ * * @return Statuses @@ -308,7 +328,8 @@ public function statuses() } /** - * Get the branch(es) of a repository + * Get the branch(es) of a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the username @@ -328,13 +349,15 @@ public function branches($username, $repository, $branch = null) } /** - * Get the contributors of a repository + * Get the contributors of a repository. + * * @link http://developer.github.com/v3/repos/ * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param boolean $includingAnonymous by default, the list only shows GitHub users. - * You can include non-users too by setting this to true + * @param string $username the user who owns the repository + * @param string $repository the name of the repository + * @param bool $includingAnonymous by default, the list only shows GitHub users. + * You can include non-users too by setting this to true + * * @return array list of the repo contributors */ public function contributors($username, $repository, $includingAnonymous = false) @@ -345,7 +368,8 @@ public function contributors($username, $repository, $includingAnonymous = false } /** - * Get the language breakdown of a repository + * Get the language breakdown of a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repository @@ -359,7 +383,8 @@ public function languages($username, $repository) } /** - * Get the tags of a repository + * Get the tags of a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repository @@ -373,7 +398,8 @@ public function tags($username, $repository) } /** - * Get the teams of a repository + * Get the teams of a repository. + * * @link http://developer.github.com/v3/repos/ * * @param string $username the user who owns the repo @@ -388,9 +414,10 @@ public function teams($username, $repository) /** * @deprecated see subscribers method - * @param string $username - * @param string $repository - * @param integer $page + * + * @param string $username + * @param string $repository + * @param int $page * * @return array */ @@ -402,9 +429,9 @@ public function watchers($username, $repository, $page = 1) } /** - * @param string $username - * @param string $repository - * @param integer $page + * @param string $username + * @param string $repository + * @param int $page * * @return array */ @@ -416,7 +443,8 @@ public function subscribers($username, $repository, $page = 1) } /** - * Perform a merge + * Perform a merge. + * * @link http://developer.github.com/v3/repos/merging/ * * @param string $username diff --git a/lib/Github/Api/Repository/Assets.php b/lib/Github/Api/Repository/Assets.php index ccd4263c27d..dbd448c7e28 100644 --- a/lib/Github/Api/Repository/Assets.php +++ b/lib/Github/Api/Repository/Assets.php @@ -15,11 +15,11 @@ class Assets extends AbstractApi { /** * Get all release's assets in selected repository - * GET /repos/:owner/:repo/releases/:id/assets + * GET /repos/:owner/:repo/releases/:id/assets. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the release + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the release * * @return array */ @@ -30,11 +30,11 @@ public function all($username, $repository, $id) /** * Get an asset in selected repository's release - * GET /repos/:owner/:repo/releases/assets/:id + * GET /repos/:owner/:repo/releases/assets/:id. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the asset + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the asset * * @return array */ @@ -45,19 +45,20 @@ public function show($username, $repository, $id) /** * Create an asset for selected repository's release - * POST /repos/:owner/:repo/releases/:id/assets?name=:filename + * POST /repos/:owner/:repo/releases/:id/assets?name=:filename. * * Creating an asset requires support for server name indentification (SNI) * so this must be supported by your PHP version. + * * @see http://developer.github.com/v3/repos/releases/#upload-a-release-asset * @see http://php.net/manual/en/openssl.constsni.php * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the release - * @param string $name the filename for the asset - * @param string $contentType the content type for the asset - * @param string $content the content of the asset + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the release + * @param string $name the filename for the asset + * @param string $contentType the content type for the asset + * @param string $content the content of the asset * * @throws MissingArgumentException * @throws ErrorException @@ -86,12 +87,12 @@ public function create($username, $repository, $id, $name, $contentType, $conten /** * Edit an asset in selected repository's release - * PATCH /repos/:owner/:repo/releases/assets/:id + * PATCH /repos/:owner/:repo/releases/assets/:id. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the asset - * @param array $params request parameters + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the asset + * @param array $params request parameters * * @throws MissingArgumentException * @@ -108,11 +109,11 @@ public function edit($username, $repository, $id, array $params) /** * Delete an asset in selected repository's release - * DELETE /repos/:owner/:repo/releases/assets/:id + * DELETE /repos/:owner/:repo/releases/assets/:id. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the asset + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the asset * * @return array */ diff --git a/lib/Github/Api/Repository/Contents.php b/lib/Github/Api/Repository/Contents.php index de6596ffa6c..c98898af63a 100644 --- a/lib/Github/Api/Repository/Contents.php +++ b/lib/Github/Api/Repository/Contents.php @@ -15,7 +15,8 @@ class Contents extends AbstractApi { /** - * Get content of README file in a repository + * Get content of README file in a repository. + * * @link http://developer.github.com/v3/repos/contents/ * * @param string $username the user who owns the repository @@ -32,7 +33,8 @@ public function readme($username, $repository, $reference = null) } /** - * Get contents of any file or directory in a repository + * Get contents of any file or directory in a repository. + * * @link http://developer.github.com/v3/repos/contents/ * * @param string $username the user who owns the repository @@ -55,7 +57,8 @@ public function show($username, $repository, $path = null, $reference = null) } /** - * Creates a new file in a repository + * Creates a new file in a repository. + * * @link http://developer.github.com/v3/repos/contents/#create-a-file * * @param string $username the user who owns the repository @@ -96,11 +99,12 @@ public function create($username, $repository, $path, $content, $message, $branc /** * Checks that a given path exists in a repository. * - * @param string $username the user who owns the repository + * @param string $username the user who owns the repository * @param string $repository the name of the repository - * @param string $path path of file to check - * @param null|string $reference reference to a branch or commit - * @return boolean + * @param string $path path of file to check + * @param null|string $reference reference to a branch or commit + * + * @return bool */ public function exists($username, $repository, $path, $reference = null) { @@ -128,7 +132,8 @@ public function exists($username, $repository, $path, $reference = null) } /** - * Updates the contents of a file in a repository + * Updates the contents of a file in a repository. + * * @link http://developer.github.com/v3/repos/contents/#update-a-file * * @param string $username the user who owns the repository @@ -170,7 +175,8 @@ public function update($username, $repository, $path, $content, $message, $sha, /** - * Deletes a file from a repository + * Deletes a file from a repository. + * * @link http://developer.github.com/v3/repos/contents/#delete-a-file * * @param string $username the user who owns the repository @@ -209,7 +215,8 @@ public function rm($username, $repository, $path, $message, $sha, $branch = null } /** - * Get content of archives in a repository + * Get content of archives in a repository. + * * @link http://developer.github.com/v3/repos/contents/ * * @param string $username the user who owns the repository @@ -230,17 +237,17 @@ public function archive($username, $repository, $format, $reference = null) } /** - * Get the contents of a file in a repository + * Get the contents of a file in a repository. * * @param string $username the user who owns the repository * @param string $repository the name of the repository * @param string $path path to file * @param null|string $reference reference to a branch or commit * - * @return null|string content of file, or null in case of base64_decode failure - * * @throws InvalidArgumentException If $path is not a file or if its encoding is different from base64 * @throws ErrorException If $path doesn't include a 'content' index + * + * @return null|string content of file, or null in case of base64_decode failure */ public function download($username, $repository, $path, $reference = null) { diff --git a/lib/Github/Api/Repository/Downloads.php b/lib/Github/Api/Repository/Downloads.php index f3b96891c77..63177e49903 100644 --- a/lib/Github/Api/Repository/Downloads.php +++ b/lib/Github/Api/Repository/Downloads.php @@ -11,7 +11,8 @@ class Downloads extends AbstractApi { /** - * List downloads in selected repository + * List downloads in selected repository. + * * @link http://developer.github.com/v3/repos/downloads/#list-downloads-for-a-repository * * @param string $username the user who owns the repo @@ -25,12 +26,13 @@ public function all($username, $repository) } /** - * Get a download in selected repository + * Get a download in selected repository. + * * @link http://developer.github.com/v3/repos/downloads/#get-a-single-download * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the download file + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the download file * * @return array */ @@ -40,12 +42,13 @@ public function show($username, $repository, $id) } /** - * Delete a download in selected repository + * Delete a download in selected repository. + * * @link http://developer.github.com/v3/repos/downloads/#delete-a-download * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the download file + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the download file * * @return array */ diff --git a/lib/Github/Api/Repository/Releases.php b/lib/Github/Api/Repository/Releases.php index 7ac3726482f..652c1b3a601 100644 --- a/lib/Github/Api/Repository/Releases.php +++ b/lib/Github/Api/Repository/Releases.php @@ -13,10 +13,10 @@ class Releases extends AbstractApi { /** - * List releases in selected repository + * List releases in selected repository. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo + * @param string $username the user who owns the repo + * @param string $repository the name of the repo * * @return array */ @@ -26,11 +26,11 @@ public function all($username, $repository) } /** - * Get a release in selected repository + * Get a release in selected repository. * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the release + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the release * * @return array */ @@ -40,11 +40,11 @@ public function show($username, $repository, $id) } /** - * Create new release in selected repository + * Create new release in selected repository. * - * @param string $username - * @param string $repository - * @param array $params + * @param string $username + * @param string $repository + * @param array $params * * @throws MissingArgumentException * @@ -60,12 +60,12 @@ public function create($username, $repository, array $params) } /** - * Edit release in selected repository + * Edit release in selected repository. * - * @param string $username - * @param string $repository - * @param integer $id - * @param array $params + * @param string $username + * @param string $repository + * @param int $id + * @param array $params * * @return array */ @@ -75,11 +75,11 @@ public function edit($username, $repository, $id, array $params) } /** - * Delete a release in selected repository (Not thoroughly tested!) + * Delete a release in selected repository (Not thoroughly tested!). * - * @param string $username the user who owns the repo - * @param string $repository the name of the repo - * @param integer $id the id of the release + * @param string $username the user who owns the repo + * @param string $repository the name of the repo + * @param int $id the id of the release * * @return array */ diff --git a/lib/Github/Api/Repository/Statuses.php b/lib/Github/Api/Repository/Statuses.php index 6d69ef3965f..caab1e2b524 100644 --- a/lib/Github/Api/Repository/Statuses.php +++ b/lib/Github/Api/Repository/Statuses.php @@ -47,9 +47,9 @@ public function combined($username, $repository, $sha) * @param string $sha * @param array $params * - * @return array - * * @throws MissingArgumentException + * + * @return array */ public function create($username, $repository, $sha, array $params = array()) { diff --git a/lib/Github/Api/Search.php b/lib/Github/Api/Search.php index 8897feaa291..e3c69e5f21e 100644 --- a/lib/Github/Api/Search.php +++ b/lib/Github/Api/Search.php @@ -18,12 +18,13 @@ class Search extends AbstractApi { /** - * Search repositories by filter (q) + * Search repositories by filter (q). + * * @link https://developer.github.com/v3/search/#search-repositories * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc + * @param string $q the filter + * @param string $sort the sort field + * @param string $order asc/desc * * @return array list of repositories found */ @@ -33,12 +34,13 @@ public function repositories($q, $sort = 'updated', $order = 'desc') } /** - * Search issues by filter (q) + * Search issues by filter (q). + * * @link https://developer.github.com/v3/search/#search-issues * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc + * @param string $q the filter + * @param string $sort the sort field + * @param string $order asc/desc * * @return array list of issues found */ @@ -48,12 +50,13 @@ public function issues($q, $sort = 'updated', $order = 'desc') } /** - * Search code by filter (q) + * Search code by filter (q). + * * @link https://developer.github.com/v3/search/#search-code * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc + * @param string $q the filter + * @param string $sort the sort field + * @param string $order asc/desc * * @return array list of code found */ @@ -63,12 +66,13 @@ public function code($q, $sort = 'updated', $order = 'desc') } /** - * Search users by filter (q) + * Search users by filter (q). + * * @link https://developer.github.com/v3/search/#search-users * - * @param string $q the filter - * @param string $sort the sort field - * @param string $order asc/desc + * @param string $q the filter + * @param string $sort the sort field + * @param string $order asc/desc * * @return array list of users found */ diff --git a/lib/Github/Api/User.php b/lib/Github/Api/User.php index 20323934fca..0cc707b0bd7 100644 --- a/lib/Github/Api/User.php +++ b/lib/Github/Api/User.php @@ -3,7 +3,7 @@ namespace Github\Api; /** - * Searching users, getting user information + * Searching users, getting user information. * * @link http://developer.github.com/v3/users/ * @author Joseph Bielawski @@ -12,7 +12,8 @@ class User extends AbstractApi { /** - * Search users by username: + * Search users by username. + * * @link http://developer.github.com/v3/search/#search-users * * @param string $keyword the keyword to search @@ -25,26 +26,30 @@ public function find($keyword) } /** - * Request all users: + * Request all users. + * * @link https://developer.github.com/v3/users/#get-all-users * - * @param integer|null $id ID of the last user that you've seen + * @param int|null $id ID of the last user that you've seen + * * @return array list of users found */ public function all($id = null) { - if (!is_integer($id)) { + if (!is_int($id)) { return $this->get('users'); } return $this->get('users?since=' . rawurldecode($id)); } /** - * Get extended information about a user by its username + * Get extended information about a user by its username. + * * @link http://developer.github.com/v3/users/ * - * @param string $username the username to show - * @return array informations about the user + * @param string $username the username to show + * + * @return array informations about the user */ public function show($username) { @@ -52,11 +57,13 @@ public function show($username) } /** - * Get extended information about a user by its username + * Get extended information about a user by its username. + * * @link https://developer.github.com/v3/orgs/ * - * @param string $username the username to show - * @return array information about organizations that user belongs to + * @param string $username the username to show + * + * @return array information about organizations that user belongs to */ public function organizations($username) { @@ -64,11 +71,13 @@ public function organizations($username) } /** - * Request the users that a specific user is following + * Request the users that a specific user is following. + * * @link http://developer.github.com/v3/users/followers/ * - * @param string $username the username - * @return array list of followed users + * @param string $username the username + * + * @return array list of followed users */ public function following($username) { @@ -76,11 +85,13 @@ public function following($username) } /** - * Request the users following a specific user + * Request the users following a specific user. + * * @link http://developer.github.com/v3/users/followers/ * - * @param string $username the username - * @return array list of following users + * @param string $username the username + * + * @return array list of following users */ public function followers($username) { @@ -88,11 +99,13 @@ public function followers($username) } /** - * Request the repository that a specific user is watching + * Request the repository that a specific user is watching. + * * @deprecated see subscriptions method * - * @param string $username the username - * @return array list of watched repositories + * @param string $username the username + * + * @return array list of watched repositories */ public function watched($username) { @@ -100,11 +113,13 @@ public function watched($username) } /** - * Request starred repositories that a specific user has starred + * Request starred repositories that a specific user has starred. + * * @link http://developer.github.com/v3/activity/starring/ * - * @param string $username the username - * @param int $page the page number of the paginated result set + * @param string $username the username + * @param int $page the page number of the paginated result set + * * @return array list of starred repositories */ public function starred($username, $page = 1) @@ -115,11 +130,13 @@ public function starred($username, $page = 1) } /** - * Request the repository that a specific user is watching + * Request the repository that a specific user is watching. + * * @link http://developer.github.com/v3/activity/watching/ * - * @param string $username the username - * @return array list of watched repositories + * @param string $username the username + * + * @return array list of watched repositories */ public function subscriptions($username) { @@ -127,14 +144,16 @@ public function subscriptions($username) } /** - * Get the repositories of a user + * Get the repositories of a user. + * * @link http://developer.github.com/v3/repos/ * - * @param string $username the username - * @param string $type role in the repository - * @param string $sort sort by - * @param string $direction direction of sort, asc or desc - * @return array list of the user repositories + * @param string $username the username + * @param string $type role in the repository + * @param string $sort sort by + * @param string $direction direction of sort, asc or desc + * + * @return array list of the user repositories */ public function repositories($username, $type = 'owner', $sort = 'full_name', $direction = 'asc') { @@ -146,11 +165,13 @@ public function repositories($username, $type = 'owner', $sort = 'full_name', $d } /** - * Get the public gists for a user + * Get the public gists for a user. + * * @link http://developer.github.com/v3/gists/ * - * @param string $username the username - * @return array list of the user gists + * @param string $username the username + * + * @return array list of the user gists */ public function gists($username) { @@ -158,11 +179,13 @@ public function gists($username) } /** - * Get the public keys for a user + * Get the public keys for a user. + * * @link http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user * - * @param string $username the username - * @return array list of the user public keys + * @param string $username the username + * + * @return array list of the user public keys */ public function keys($username) { @@ -170,7 +193,7 @@ public function keys($username) } /** - * List events performed by a user + * List events performed by a user. * * @link http://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user * diff --git a/lib/Github/Client.php b/lib/Github/Client.php index e63af775507..997b5d84626 100644 --- a/lib/Github/Client.php +++ b/lib/Github/Client.php @@ -9,7 +9,7 @@ use Github\HttpClient\HttpClientInterface; /** - * Simple yet very cool PHP GitHub client + * Simple yet very cool PHP GitHub client. * * @method Api\CurrentUser currentUser() * @method Api\CurrentUser me() @@ -56,7 +56,7 @@ class Client /** * Constant for authentication method. Not indicates the new login, but allows - * usage of unauthenticated rate limited requests for given client_id + client_secret + * usage of unauthenticated rate limited requests for given client_id + client_secret. */ const AUTH_URL_CLIENT_ID = 'url_client_id'; @@ -88,14 +88,14 @@ class Client ); /** - * The Buzz instance used to communicate with GitHub + * The Buzz instance used to communicate with GitHub. * * @var HttpClient */ private $httpClient; /** - * Instantiate a new GitHub client + * Instantiate a new GitHub client. * * @param null|HttpClientInterface $httpClient Github http client */ @@ -107,9 +107,9 @@ public function __construct(HttpClientInterface $httpClient = null) /** * @param string $name * - * @return ApiInterface - * * @throws InvalidArgumentException + * + * @return ApiInterface */ public function api($name) { @@ -201,7 +201,7 @@ public function api($name) } /** - * Authenticate a user for all next requests + * Authenticate a user for all next requests. * * @param string $tokenOrLogin GitHub private token/username/client ID * @param null|string $password GitHub password/secret (optionally can contain $authMethod) @@ -259,7 +259,7 @@ public function setHttpClient(HttpClientInterface $httpClient) } /** - * Clears used headers + * Clears used headers. */ public function clearHeaders() { @@ -277,9 +277,9 @@ public function setHeaders(array $headers) /** * @param string $name * - * @return mixed - * * @throws InvalidArgumentException + * + * @return mixed */ public function getOption($name) { @@ -323,9 +323,9 @@ public function getSupportedApiVersions() /** * @param string $name * - * @return ApiInterface - * * @throws InvalidArgumentException + * + * @return ApiInterface */ public function __call($name, $args) { diff --git a/lib/Github/Exception/ApiLimitExceedException.php b/lib/Github/Exception/ApiLimitExceedException.php index 851631cccf8..539243a6837 100644 --- a/lib/Github/Exception/ApiLimitExceedException.php +++ b/lib/Github/Exception/ApiLimitExceedException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * ApiLimitExceedException + * ApiLimitExceedException. * * @author Joseph Bielawski */ diff --git a/lib/Github/Exception/BadMethodCallException.php b/lib/Github/Exception/BadMethodCallException.php index f12a8ce2cfb..83e05437b11 100644 --- a/lib/Github/Exception/BadMethodCallException.php +++ b/lib/Github/Exception/BadMethodCallException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * BadMethodCallException + * BadMethodCallException. * * @author James Brooks */ diff --git a/lib/Github/Exception/ErrorException.php b/lib/Github/Exception/ErrorException.php index 33f902edbe9..61f61f36f18 100644 --- a/lib/Github/Exception/ErrorException.php +++ b/lib/Github/Exception/ErrorException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * ErrorException + * ErrorException. * * @author Joseph Bielawski */ diff --git a/lib/Github/Exception/InvalidArgumentException.php b/lib/Github/Exception/InvalidArgumentException.php index cecc11b8bba..558b3b0f3dc 100644 --- a/lib/Github/Exception/InvalidArgumentException.php +++ b/lib/Github/Exception/InvalidArgumentException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * InvalidArgumentException + * InvalidArgumentException. * * @author Joseph Bielawski */ diff --git a/lib/Github/Exception/MissingArgumentException.php b/lib/Github/Exception/MissingArgumentException.php index fd14ba01953..4a7e372e97c 100644 --- a/lib/Github/Exception/MissingArgumentException.php +++ b/lib/Github/Exception/MissingArgumentException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * MissingArgumentException + * MissingArgumentException. * * @author Joseph Bielawski */ diff --git a/lib/Github/Exception/RuntimeException.php b/lib/Github/Exception/RuntimeException.php index e4e9712b481..676cb95736a 100644 --- a/lib/Github/Exception/RuntimeException.php +++ b/lib/Github/Exception/RuntimeException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * RuntimeException + * RuntimeException. * * @author Joseph Bielawski */ diff --git a/lib/Github/Exception/ValidationFailedException.php b/lib/Github/Exception/ValidationFailedException.php index 0de17aea3e7..e43bc43e067 100644 --- a/lib/Github/Exception/ValidationFailedException.php +++ b/lib/Github/Exception/ValidationFailedException.php @@ -3,7 +3,7 @@ namespace Github\Exception; /** - * ValidationFailedException + * ValidationFailedException. * * @author Joseph Bielawski */ diff --git a/lib/Github/HttpClient/Cache/CacheInterface.php b/lib/Github/HttpClient/Cache/CacheInterface.php index e669f72fe1a..77bb4f89ec9 100644 --- a/lib/Github/HttpClient/Cache/CacheInterface.php +++ b/lib/Github/HttpClient/Cache/CacheInterface.php @@ -5,7 +5,7 @@ use Guzzle\Http\Message\Response; /** - * Caches github api responses + * Caches github api responses. * * @author Florian Klein */ @@ -21,7 +21,7 @@ public function has($id); /** * @param string $id The id of the cached resource * - * @return null|integer The modified since timestamp + * @return null|int The modified since timestamp */ public function getModifiedSince($id); @@ -35,9 +35,9 @@ public function getETag($id); /** * @param string $id The id of the cached resource * - * @return Response The cached response object - * * @throws \InvalidArgumentException If cache data don't exists + * + * @return Response The cached response object */ public function get($id); diff --git a/lib/Github/HttpClient/Cache/GaufretteCache.php b/lib/Github/HttpClient/Cache/GaufretteCache.php index 0797a043b91..b72a104c9af 100644 --- a/lib/Github/HttpClient/Cache/GaufretteCache.php +++ b/lib/Github/HttpClient/Cache/GaufretteCache.php @@ -6,7 +6,7 @@ use Gaufrette\Filesystem; /** - * Gaufrette Cache + * Gaufrette Cache. * * @author Massimiliano Arione */ diff --git a/lib/Github/HttpClient/CachedHttpClient.php b/lib/Github/HttpClient/CachedHttpClient.php index d7003c6bde9..f0e1368e6f3 100644 --- a/lib/Github/HttpClient/CachedHttpClient.php +++ b/lib/Github/HttpClient/CachedHttpClient.php @@ -8,7 +8,7 @@ /** * Performs requests on GitHub API using If-Modified-Since headers. * Returns a cached version if not modified - * Avoids increasing the X-Rate-Limit, which is cool + * Avoids increasing the X-Rate-Limit, which is cool. * * @author Florian Klein */ @@ -18,9 +18,9 @@ class CachedHttpClient extends HttpClient * @var CacheInterface */ protected $cache; - + /** - * contains the lastResponse fetched from cache + * Contains the lastResponse fetched from cache. * * @var Guzzle\Http\Message\Response */ @@ -52,11 +52,11 @@ public function setCache(CacheInterface $cache) public function request($path, $body = null, $httpMethod = 'GET', array $headers = array(), array $options = array()) { $response = parent::request($path, $body, $httpMethod, $headers, $options); - + if (304 == $response->getStatusCode()) { $cacheResponse = $this->getCache()->get($path); $this->lastCachedResponse = $cacheResponse; - + return $cacheResponse; } @@ -66,7 +66,7 @@ public function request($path, $body = null, $httpMethod = 'GET', array $headers } /** - * Create requests with If-Modified-Since headers + * Create requests with If-Modified-Since headers. * * {@inheritdoc} */ @@ -92,8 +92,8 @@ protected function createRequest($httpMethod, $path, $body = null, array $header return $request; } - - /** + + /** * @return Guzzle\Http\Message\Response */ public function getLastResponse($force = false) @@ -102,7 +102,7 @@ public function getLastResponse($force = false) if (304 != $lastResponse->getStatusCode()) { $force = true; } - + return ($force) ? $lastResponse : $this->lastCachedResponse; } } diff --git a/lib/Github/HttpClient/HttpClient.php b/lib/Github/HttpClient/HttpClient.php index 5e907419221..84b2b09bc46 100644 --- a/lib/Github/HttpClient/HttpClient.php +++ b/lib/Github/HttpClient/HttpClient.php @@ -68,7 +68,7 @@ public function setHeaders(array $headers) } /** - * Clears used headers + * Clears used headers. */ public function clearHeaders() { diff --git a/lib/Github/HttpClient/HttpClientInterface.php b/lib/Github/HttpClient/HttpClientInterface.php index 0961b8cc7a7..5ed0a9e34e5 100644 --- a/lib/Github/HttpClient/HttpClientInterface.php +++ b/lib/Github/HttpClient/HttpClientInterface.php @@ -13,7 +13,7 @@ interface HttpClientInterface { /** - * Send a GET request + * Send a GET request. * * @param string $path Request path * @param array $parameters GET Parameters @@ -24,45 +24,46 @@ interface HttpClientInterface public function get($path, array $parameters = array(), array $headers = array()); /** - * Send a POST request + * Send a POST request. * - * @param string $path Request path - * @param mixed $body Request body - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param mixed $body Request body + * @param array $headers Reconfigure the request headers for this call only * * @return Response */ public function post($path, $body = null, array $headers = array()); /** - * Send a PATCH request + * Send a PATCH request. * - * @param string $path Request path - * @param mixed $body Request body - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param mixed $body Request body + * @param array $headers Reconfigure the request headers for this call only * * @internal param array $parameters Request body + * * @return Response */ public function patch($path, $body = null, array $headers = array()); /** - * Send a PUT request + * Send a PUT request. * - * @param string $path Request path - * @param mixed $body Request body - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param mixed $body Request body + * @param array $headers Reconfigure the request headers for this call only * * @return Response */ public function put($path, $body, array $headers = array()); /** - * Send a DELETE request + * Send a DELETE request. * - * @param string $path Request path - * @param mixed $body Request body - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param mixed $body Request body + * @param array $headers Reconfigure the request headers for this call only * * @return Response */ @@ -70,7 +71,7 @@ public function delete($path, $body = null, array $headers = array()); /** * Send a request to the server, receive a response, - * decode the response and returns an associative array + * decode the response and returns an associative array. * * @param string $path Request path * @param mixed $body Request body @@ -92,14 +93,14 @@ public function request($path, $body, $httpMethod = 'GET', array $headers = arra public function setOption($name, $value); /** - * Set HTTP headers + * Set HTTP headers. * * @param array $headers */ public function setHeaders(array $headers); /** - * Authenticate a user for all next requests + * Authenticate a user for all next requests. * * @param string $tokenOrLogin GitHub private token/username/client ID * @param null|string $password GitHub password/secret (optionally can contain $authMethod) diff --git a/lib/Github/ResultPager.php b/lib/Github/ResultPager.php index 7483194ba3b..01c689a58d9 100644 --- a/lib/Github/ResultPager.php +++ b/lib/Github/ResultPager.php @@ -6,7 +6,7 @@ use Github\HttpClient\Message\ResponseMediator; /** - * Pager class for supporting pagination in github classes + * Pager class for supporting pagination in github classes. * * @author Ramon de la Fuente * @author Mitchel Verschoof @@ -14,26 +14,31 @@ class ResultPager implements ResultPagerInterface { /** - * @var \Github\Client client + * The GitHub Client to use for pagination. + * + * @var \Github\Client */ protected $client; /** - * @var array pagination - * Comes from pagination headers in Github API results + * Comes from pagination headers in Github API results. + * + * @var array */ protected $pagination; /** - * The Github client to use for pagination. This must be the same - * instance that you got the Api instance from, i.e.: + * The Github client to use for pagination. + * + * This must be the same instance that you got the Api instance from. + * + * Example code: * * $client = new \Github\Client(); * $api = $client->api('someApi'); * $pager = new \Github\ResultPager($client); * * @param \Github\Client $client - * */ public function __construct(Client $client) { @@ -67,7 +72,7 @@ public function fetchAll(ApiInterface $api, $method, array $parameters = array() // get the perPage from the api $perPage = $api->getPerPage(); - // Set parameters per_page to GitHub max to minimize number of requests + // set parameters per_page to GitHub max to minimize number of requests $api->setPerPage(100); $result = array(); diff --git a/lib/Github/ResultPagerInterface.php b/lib/Github/ResultPagerInterface.php index 7604fd0ecea..1130e8ec409 100644 --- a/lib/Github/ResultPagerInterface.php +++ b/lib/Github/ResultPagerInterface.php @@ -5,21 +5,20 @@ use Github\Api\ApiInterface; /** - * Pager interface + * Pager interface. * * @author Ramon de la Fuente * @author Mitchel Verschoof */ interface ResultPagerInterface { - /** - * @return null|array pagination result of last request + * @return null|array pagination result of last request */ public function getPagination(); /** - * Fetch a single result (page) from an api call + * Fetch a single result (page) from an api call. * * @param ApiInterface $api the Api instance * @param string $method the method name to call on the Api instance @@ -30,8 +29,9 @@ public function getPagination(); public function fetch(ApiInterface $api, $method, array $parameters = array()); /** - * Fetch all results (pages) from an api call - * Use with care - there is no maximum + * Fetch all results (pages) from an api call. + * + * Use with care - there is no maximum. * * @param ApiInterface $api the Api instance * @param string $method the method name to call on the Api instance @@ -42,42 +42,48 @@ public function fetch(ApiInterface $api, $method, array $parameters = array()); public function fetchAll(ApiInterface $api, $method, array $parameters = array()); /** - * Method that performs the actual work to refresh the pagination property + * Method that performs the actual work to refresh the pagination property. */ public function postFetch(); /** - * Check to determine the availability of a next page + * Check to determine the availability of a next page. + * * @return bool */ public function hasNext(); /** - * Check to determine the availability of a previous page + * Check to determine the availability of a previous page. + * * @return bool */ public function hasPrevious(); /** - * Fetch the next page + * Fetch the next page. + * * @return array */ public function fetchNext(); /** - * Fetch the previous page + * Fetch the previous page. + * * @return array */ public function fetchPrevious(); /** - * Fetch the first page + * Fetch the first page. + * * @return array */ public function fetchFirst(); /** - * Fetch the last page + * Fetch the last page. + * * @return array */ public function fetchLast(); diff --git a/test/Github/Tests/Api/CurrentUserTest.php b/test/Github/Tests/Api/CurrentUserTest.php index 902b53957b8..1549f3621c0 100644 --- a/test/Github/Tests/Api/CurrentUserTest.php +++ b/test/Github/Tests/Api/CurrentUserTest.php @@ -134,7 +134,7 @@ public function shouldGetWatchersApiObject() $this->assertInstanceOf('Github\Api\CurrentUser\Watchers', $api->watchers()); } - /** + /** * @test */ public function shouldGetStarredApiObject() diff --git a/test/Github/Tests/Api/Enterprise/StatsTest.php b/test/Github/Tests/Api/Enterprise/StatsTest.php index 97e28962556..3bd34ef3fae 100644 --- a/test/Github/Tests/Api/Enterprise/StatsTest.php +++ b/test/Github/Tests/Api/Enterprise/StatsTest.php @@ -61,6 +61,7 @@ public function getTypes() /** * @param string $key + * * @return mixed */ protected function getStatsData($key = '') diff --git a/test/Github/Tests/ResultPagerTest.php b/test/Github/Tests/ResultPagerTest.php index df7f0e11c85..075226587f7 100644 --- a/test/Github/Tests/ResultPagerTest.php +++ b/test/Github/Tests/ResultPagerTest.php @@ -9,7 +9,7 @@ use Github\Tests\Mock\TestResponse; /** - * ResultPagerTest + * ResultPagerTest. * * @author Ramon de la Fuente * @author Mitchel Verschoof