From 7f44a117797a849e55e78b095de0be1440b98615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 17 May 2013 14:52:29 +0200 Subject: [PATCH 1/2] Removed useless condition --- lib/Github/Client.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/Github/Client.php b/lib/Github/Client.php index 0ae764b49e0..a69a9c762a1 100644 --- a/lib/Github/Client.php +++ b/lib/Github/Client.php @@ -72,9 +72,7 @@ class Client */ public function __construct(HttpClientInterface $httpClient = null) { - if (null !== $httpClient) { - $this->httpClient = $httpClient; - } + $this->httpClient = $httpClient; } /** From 67c72b49c1742cc8c8bb74639cff89dea1684584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Fri, 17 May 2013 14:57:00 +0200 Subject: [PATCH 2/2] Fixed CS --- lib/Github/Api/CurrentUser.php | 2 +- lib/Github/Api/CurrentUser/Followers.php | 8 +- lib/Github/Api/CurrentUser/Notifications.php | 30 ++--- lib/Github/Api/CurrentUser/Watchers.php | 14 +-- lib/Github/Api/Issue.php | 54 ++++----- lib/Github/Api/Organization.php | 10 +- lib/Github/Api/PullRequest.php | 36 +++--- lib/Github/Api/Repo.php | 108 +++++++++--------- lib/Github/Api/Repository/Contents.php | 45 ++++---- lib/Github/Api/Repository/Downloads.php | 16 +-- lib/Github/Api/Repository/Statuses.php | 2 +- lib/Github/Api/User.php | 32 +++--- lib/Github/Client.php | 12 +- .../HttpClient/Cache/CacheInterface.php | 7 +- .../HttpClient/Cache/FilesystemCache.php | 1 - lib/Github/HttpClient/HttpClient.php | 2 - lib/Github/HttpClient/HttpClientInterface.php | 62 +++++----- lib/Github/ResultPager.php | 3 - lib/Github/ResultPagerInterface.php | 16 +-- test/Github/Tests/Api/Issue/CommentsTest.php | 1 - .../Repository/ContentsDownloadFixture.php | 2 +- .../Tests/Api/Repository/ContentsTest.php | 6 +- .../Tests/Api/Repository/DeployKeysTest.php | 1 - .../Github/Tests/Api/Repository/HooksTest.php | 1 - .../Tests/Api/Repository/LabelsTest.php | 1 - .../HttpClient/Cache/FilesystemCacheTest.php | 1 - test/Github/Tests/Mock/TestResponse.php | 2 +- test/bootstrap.php | 3 +- 28 files changed, 231 insertions(+), 247 deletions(-) diff --git a/lib/Github/Api/CurrentUser.php b/lib/Github/Api/CurrentUser.php index dba5325e5e6..688282cb65b 100644 --- a/lib/Github/Api/CurrentUser.php +++ b/lib/Github/Api/CurrentUser.php @@ -100,7 +100,7 @@ public function watched($page = 1) 'page' => $page )); } - + /** * @link http://developer.github.com/changes/2012-9-5-watcher-api/ */ diff --git a/lib/Github/Api/CurrentUser/Followers.php b/lib/Github/Api/CurrentUser/Followers.php index d513e5ff251..022df3374f8 100644 --- a/lib/Github/Api/CurrentUser/Followers.php +++ b/lib/Github/Api/CurrentUser/Followers.php @@ -14,7 +14,7 @@ class Followers extends AbstractApi * List followed users by the authenticated user * @link http://developer.github.com/v3/repos/followers/ * - * @param integer $page + * @param integer $page * @return array */ public function all($page = 1) @@ -28,7 +28,7 @@ public function all($page = 1) * 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) @@ -40,7 +40,7 @@ public function check($username) * 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) @@ -52,7 +52,7 @@ public function follow($username) * 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 1f9a377110f..40d37a50bf8 100644 --- a/lib/Github/Api/CurrentUser/Notifications.php +++ b/lib/Github/Api/CurrentUser/Notifications.php @@ -14,7 +14,7 @@ class Notifications extends AbstractApi * 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()) @@ -26,9 +26,9 @@ public function all(array $params = array()) * 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 +39,7 @@ 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 +50,9 @@ 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 +63,8 @@ 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 +75,7 @@ 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 +86,7 @@ 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 +97,8 @@ 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 +109,7 @@ 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/Watchers.php b/lib/Github/Api/CurrentUser/Watchers.php index 1277ff34f9c..7a752c0b90d 100644 --- a/lib/Github/Api/CurrentUser/Watchers.php +++ b/lib/Github/Api/CurrentUser/Watchers.php @@ -14,7 +14,7 @@ class Watchers extends AbstractApi * List repositories watched by the authenticated user * @link http://developer.github.com/v3/repos/watching/ * - * @param integer $page + * @param integer $page * @return array */ public function all($page = 1) @@ -28,8 +28,8 @@ public function all($page = 1) * Check that the authenticated user watches a repository * @link http://developer.github.com/v3/repos/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) @@ -41,8 +41,8 @@ public function check($username, $repository) * Make the authenticated user watch a repository * @link http://developer.github.com/v3/repos/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) @@ -54,8 +54,8 @@ public function watch($username, $repository) * Make the authenticated user unwatch a repository * @link http://developer.github.com/v3/repos/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/Issue.php b/lib/Github/Api/Issue.php index c1afaf45ec5..918eb478138 100644 --- a/lib/Github/Api/Issue.php +++ b/lib/Github/Api/Issue.php @@ -21,10 +21,10 @@ class Issue extends AbstractApi * 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()) { @@ -35,12 +35,12 @@ public function all($username, $repository, array $params = array()) * Search issues by username, repo, state and keyword * @link http://developer.github.com/v3/search/#search-issues * - * @param string $username the username - * @param string $repository the repository - * @param string $state the issue state, can be open or closed - * @param string $keyword the keyword to filter issues by + * @param string $username the username + * @param string $repository the repository + * @param string $state the issue state, can be open or closed + * @param string $keyword the keyword to filter issues by * - * @return array list of issues found + * @return array list of issues found */ public function find($username, $repository, $state, $keyword) { @@ -55,10 +55,10 @@ public function find($username, $repository, $state, $keyword) * 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()) { @@ -73,10 +73,10 @@ public function org($organization, $state, array $params = array()) * 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) { @@ -88,10 +88,10 @@ public function show($username, $repository, $id) * 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 + * @return array information about the issue * * @throws MissingArgumentException */ @@ -108,12 +108,12 @@ 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 - * @param string $repository the repository - * @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 + * @param string $username the username + * @param string $repository the repository + * @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) { diff --git a/lib/Github/Api/Organization.php b/lib/Github/Api/Organization.php index 29f23ccf2d7..0a1af06b8d4 100644 --- a/lib/Github/Api/Organization.php +++ b/lib/Github/Api/Organization.php @@ -18,9 +18,9 @@ class Organization extends AbstractApi * Get extended information about an organization by its name * @link http://developer.github.com/v3/orgs/#get * - * @param string $organization the organization to show + * @param string $organization the organization to show * - * @return array informations about the organization + * @return array informations about the organization */ public function show($organization) { @@ -36,10 +36,10 @@ public function update($organization, array $params) * 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 - * @param string $type the type of repositories + * @param string $organization the user name + * @param string $type the type of repositories * - * @return array the repositories + * @return array the repositories */ public function repositories($organization, $type = 'all') { diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index c322c00f003..4f2170fe09d 100644 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -17,14 +17,14 @@ 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 string $state the state of the fetched pull requests. - * The API seems to automatically default to 'open' - * @param integer $page the page - * @param integer $perPage the per page + * @param string $username the username + * @param string $repository the repository + * @param string $state the state of the fetched pull requests. + * The API seems to automatically default to 'open' + * @param integer $page the page + * @param integer $perPage the per page * - * @return array array of pull requests for the project + * @return array array of pull requests for the project */ public function all($username, $repository, $state = null, $page = 1, $perPage = 30) { @@ -41,11 +41,11 @@ public function all($username, $repository, $state = null, $page = 1, $perPage = * Show all details of a pull request, including the discussions. * @link http://developer.github.com/v3/pulls/ * - * @param string $username the username - * @param string $repository the repository - * @param string $id the ID of the pull request for which details are retrieved + * @param string $username the username + * @param string $repository the repository + * @param string $id the ID of the pull request for which details are retrieved * - * @return array array of pull requests for the project + * @return array array of pull requests for the project */ public function show($username, $repository, $id) { @@ -71,13 +71,13 @@ public function comments() * Create a pull request * @link http://developer.github.com/v3/pulls/ * - * @param string $username the username - * @param string $repository the repository - * @param array $params A String of the branch or commit SHA that you want your changes to be pulled to. - * A String of the branch or commit SHA of your changes. Typically this will be a branch. - * If the branch is in a fork of the original repository, specify the username first: - * "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. + * @param string $username the username + * @param string $repository the repository + * @param array $params A String of the branch or commit SHA that you want your changes to be pulled to. + * A String of the branch or commit SHA of your changes. Typically this will be a branch. + * If the branch is in a fork of the original repository, specify the username first: + * "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 * diff --git a/lib/Github/Api/Repo.php b/lib/Github/Api/Repo.php index 5f39087804e..711af9e5cd2 100644 --- a/lib/Github/Api/Repo.php +++ b/lib/Github/Api/Repo.php @@ -27,10 +27,10 @@ class Repo extends AbstractApi * Search repositories by keyword: * @link http://developer.github.com/v3/search/#search-repositories * - * @param string $keyword the search query - * @param array $params + * @param string $keyword the search query + * @param array $params * - * @return array list of founded repositories + * @return array list of founded repositories */ public function find($keyword, array $params) { @@ -41,10 +41,10 @@ public function find($keyword, array $params) * List all repositories for an organization * @link http://developer.github.com/v3/repos/#list-organization-repositories * - * @param string $organization the name of the organization - * @param array $params + * @param string $organization the name of the organization + * @param array $params * - * @return array list of organization repositories + * @return array list of organization repositories */ public function org($organization, array $params = array()) { @@ -55,10 +55,10 @@ public function org($organization, array $params = array()) * 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 - * @param string $repository the name of the repository + * @param string $username the user who owns the repository + * @param string $repository the name of the repository * - * @return array informations about the repository + * @return array informations about the repository */ public function show($username, $repository) { @@ -69,18 +69,18 @@ public function show($username, $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 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 $hadDownloads `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 - * - * @return array returns repository data + * @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 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 $hadDownloads `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 + * + * @return array returns repository data */ public function create( $name, @@ -118,11 +118,11 @@ public function create( * Set information 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 array $values the key => value pairs to post + * @param string $username the user who owns the repository + * @param string $repository the name of the repository + * @param array $values the key => value pairs to post * - * @return array informations about the repository + * @return array informations about the repository */ public function update($username, $repository, array $values) { @@ -133,10 +133,10 @@ public function update($username, $repository, array $values) * Delete 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 string $username the user who owns the repository + * @param string $repository the name of the repository * - * @return mixed null on success, array on error with 'message' + * @return mixed null on success, array on error with 'message' */ public function remove($username, $repository) { @@ -257,11 +257,11 @@ public function statuses() * Get the branch(es) of a repository * @link http://developer.github.com/v3/repos/ * - * @param string $username the username - * @param string $repository the name of the repository - * @param string $branch the name of the branch + * @param string $username the username + * @param string $repository the name of the repository + * @param string $branch the name of the branch * - * @return array list of the repository branches + * @return array list of the repository branches */ public function branches($username, $repository, $branch = null) { @@ -277,11 +277,11 @@ public function branches($username, $repository, $branch = null) * 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 - * @return array list of the repo contributors + * @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 + * @return array list of the repo contributors */ public function contributors($username, $repository, $includingAnonymous = false) { @@ -294,10 +294,10 @@ public function contributors($username, $repository, $includingAnonymous = false * Get the language breakdown 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 string $username the user who owns the repository + * @param string $repository the name of the repository * - * @return array list of the languages + * @return array list of the languages */ public function languages($username, $repository) { @@ -308,10 +308,10 @@ public function languages($username, $repository) * Get the tags 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 string $username the user who owns the repository + * @param string $repository the name of the repository * - * @return array list of the repository tags + * @return array list of the repository tags */ public function tags($username, $repository) { @@ -322,10 +322,10 @@ public function tags($username, $repository) * Get the teams of a repository * @link http://developer.github.com/v3/repos/ * - * @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 list of the languages + * @return array list of the languages */ public function teams($username, $repository) { @@ -333,9 +333,9 @@ public function teams($username, $repository) } /** - * @param string $username - * @param string $repository - * @param integer $page + * @param string $username + * @param string $repository + * @param integer $page * * @return array */ @@ -350,11 +350,11 @@ public function watchers($username, $repository, $page = 1) * Perform a merge * @link http://developer.github.com/v3/repos/merging/ * - * @param string $username - * @param string $repository - * @param string $base The name of the base branch that the head will be merged into. - * @param string $head The head to merge. This can be a branch name or a commit SHA1. - * @param string $message Commit message to use for the merge commit. If omitted, a default message will be used. + * @param string $username + * @param string $repository + * @param string $base The name of the base branch that the head will be merged into. + * @param string $head The head to merge. This can be a branch name or a commit SHA1. + * @param string $message Commit message to use for the merge commit. If omitted, a default message will be used. * * @return array|null */ diff --git a/lib/Github/Api/Repository/Contents.php b/lib/Github/Api/Repository/Contents.php index 9ee90f713a7..6a79377654f 100644 --- a/lib/Github/Api/Repository/Contents.php +++ b/lib/Github/Api/Repository/Contents.php @@ -3,7 +3,6 @@ namespace Github\Api\Repository; use Github\Api\AbstractApi; -use Github\Exception\MissingArgumentException; use Github\Exception\InvalidArgumentException; use Github\Exception\ErrorException; @@ -17,11 +16,11 @@ class Contents extends AbstractApi * 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 - * @param string $repository the name of the repository - * @param null|string $reference reference to a branch or commit + * @param string $username the user who owns the repository + * @param string $repository the name of the repository + * @param null|string $reference reference to a branch or commit * - * @return array information for README file + * @return array information for README file */ public function readme($username, $repository, $reference = null) { @@ -34,12 +33,12 @@ public function readme($username, $repository, $reference = null) * 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 - * @param string $repository the name of the repository - * @param null|string $path path to file or directory - * @param null|string $reference reference to a branch or commit + * @param string $username the user who owns the repository + * @param string $repository the name of the repository + * @param null|string $path path to file or directory + * @param null|string $reference reference to a branch or commit * - * @return array information for file | information for each item in directory + * @return array information for file | information for each item in directory */ public function show($username, $repository, $path = null, $reference = null) { @@ -57,12 +56,12 @@ public function show($username, $repository, $path = null, $reference = null) * Get content of archives in a repository * @link http://developer.github.com/v3/repos/contents/ * - * @param string $username the user who owns the repository - * @param string $repository the name of the repository - * @param string $format format of archive: tarball or zipball - * @param null|string $reference reference to a branch or commit + * @param string $username the user who owns the repository + * @param string $repository the name of the repository + * @param string $format format of archive: tarball or zipball + * @param null|string $reference reference to a branch or commit * - * @return array information for archives + * @return array information for archives */ public function archive($username, $repository, $format, $reference = null) { @@ -74,19 +73,19 @@ public function archive($username, $repository, $format, $reference = null) 'ref' => $reference )); } - + /** * 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 + * @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 + * @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 + * @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 */ 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 c289e1a8ef9..e402c317c1d 100644 --- a/lib/Github/Api/Repository/Downloads.php +++ b/lib/Github/Api/Repository/Downloads.php @@ -14,8 +14,8 @@ class Downloads extends AbstractApi * 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 - * @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 */ @@ -28,9 +28,9 @@ public function all($username, $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 integer $id the id of the download file * * @return array */ @@ -43,9 +43,9 @@ public function show($username, $repository, $id) * 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 integer $id the id of the download file * * @return array */ diff --git a/lib/Github/Api/Repository/Statuses.php b/lib/Github/Api/Repository/Statuses.php index 9872acd06d7..9b3e7630ecc 100644 --- a/lib/Github/Api/Repository/Statuses.php +++ b/lib/Github/Api/Repository/Statuses.php @@ -31,7 +31,7 @@ public function show($username, $repository, $sha) * @param string $username * @param string $repository * @param string $sha - * @param array $params + * @param array $params * * @return array * diff --git a/lib/Github/Api/User.php b/lib/Github/Api/User.php index 2241f79eb8c..6ecb28ca597 100644 --- a/lib/Github/Api/User.php +++ b/lib/Github/Api/User.php @@ -15,9 +15,9 @@ class User extends AbstractApi * Search users by username: * @link http://developer.github.com/v3/search/#search-users * - * @param string $keyword the keyword to search + * @param string $keyword the keyword to search * - * @return array list of users found + * @return array list of users found */ public function find($keyword) { @@ -28,8 +28,8 @@ public function find($keyword) * 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) { @@ -40,8 +40,8 @@ public function show($username) * 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) { @@ -52,8 +52,8 @@ public function following($username) * 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) { @@ -64,8 +64,8 @@ public function followers($username) * Request the repository that a specific user is watching * @link http://developer.github.com/v3/repos/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 watched($username) { @@ -76,8 +76,8 @@ public function watched($username) * Get the repositories of a user * @link http://developer.github.com/v3/repos/ * - * @param string $username the username - * @return array list of the user repositories + * @param string $username the username + * @return array list of the user repositories */ public function repositories($username) { @@ -88,8 +88,8 @@ public function repositories($username) * 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) { @@ -100,8 +100,8 @@ public function gists($username) * 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) { diff --git a/lib/Github/Client.php b/lib/Github/Client.php index a69a9c762a1..e50d5e94638 100644 --- a/lib/Github/Client.php +++ b/lib/Github/Client.php @@ -2,9 +2,6 @@ namespace Github; -use Buzz\Client\Curl; -use Buzz\Client\ClientInterface; - use Github\Api\ApiInterface; use Github\Exception\InvalidArgumentException; use Github\HttpClient\HttpClient; @@ -147,11 +144,11 @@ public function api($name) /** * 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) - * @param null|string $authMethod One of the AUTH_* class constants + * @param string $tokenOrLogin GitHub private token/username/client ID + * @param null|string $password GitHub password/secret (optionally can contain $authMethod) + * @param null|string $authMethod One of the AUTH_* class constants * - * @throws InvalidArgumentException If no authentication method was given + * @throws InvalidArgumentException If no authentication method was given */ public function authenticate($tokenOrLogin, $password = null, $authMethod = null) { @@ -219,7 +216,6 @@ public function getOption($name) return $this->options[$name]; } - /** * @param string $name * @param mixed $value diff --git a/lib/Github/HttpClient/Cache/CacheInterface.php b/lib/Github/HttpClient/Cache/CacheInterface.php index b2889d1e4db..b1ada0e53d9 100644 --- a/lib/Github/HttpClient/Cache/CacheInterface.php +++ b/lib/Github/HttpClient/Cache/CacheInterface.php @@ -12,16 +12,16 @@ interface CacheInterface { /** - * @param string $id The id of the cached resource + * @param string $id The id of the cached resource * * @return null|integer The modified since timestamp */ public function getModifiedSince($id); /** - * @param string $id The id of the cached resource + * @param string $id The id of the cached resource * - * @return Response The cached response object + * @return Response The cached response object * * @throws \InvalidArgumentException If cache data don't exists */ @@ -35,4 +35,3 @@ public function get($id); */ public function set($id, Response $response); } - diff --git a/lib/Github/HttpClient/Cache/FilesystemCache.php b/lib/Github/HttpClient/Cache/FilesystemCache.php index c700d31cb2e..ad1f90821cf 100644 --- a/lib/Github/HttpClient/Cache/FilesystemCache.php +++ b/lib/Github/HttpClient/Cache/FilesystemCache.php @@ -67,4 +67,3 @@ protected function getPath($id) return sprintf('%s%s%s', rtrim($this->path, DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR, md5($id)); } } - diff --git a/lib/Github/HttpClient/HttpClient.php b/lib/Github/HttpClient/HttpClient.php index 7d13ca6a129..8e5bafcab16 100644 --- a/lib/Github/HttpClient/HttpClient.php +++ b/lib/Github/HttpClient/HttpClient.php @@ -3,8 +3,6 @@ namespace Github\HttpClient; use Buzz\Client\ClientInterface; -use Buzz\Message\MessageInterface; -use Buzz\Message\RequestInterface; use Buzz\Listener\ListenerInterface; use Github\Exception\ErrorException; diff --git a/lib/Github/HttpClient/HttpClientInterface.php b/lib/Github/HttpClient/HttpClientInterface.php index f84472ee7d6..09ee8d11708 100644 --- a/lib/Github/HttpClient/HttpClientInterface.php +++ b/lib/Github/HttpClient/HttpClientInterface.php @@ -14,55 +14,55 @@ interface HttpClientInterface /** * Send a GET request * - * @param string $path Request path - * @param array $parameters GET Parameters - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param array $parameters GET Parameters + * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return array Data */ public function get($path, array $parameters = array(), array $headers = array()); /** * Send a POST request * - * @param string $path Request path - * @param array $parameters POST Parameters - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param array $parameters POST Parameters + * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return array Data */ public function post($path, array $parameters = array(), array $headers = array()); /** * Send a PATCH request * - * @param string $path Request path - * @param array $parameters PATCH Parameters - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param array $parameters PATCH Parameters + * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return array Data */ public function patch($path, array $parameters = array(), array $headers = array()); /** * Send a PUT request * - * @param string $path Request path - * @param array $parameters PUT Parameters - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param array $parameters PUT Parameters + * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return array Data */ public function put($path, array $parameters = array(), array $headers = array()); /** * Send a DELETE request * - * @param string $path Request path - * @param array $parameters DELETE Parameters - * @param array $headers Reconfigure the request headers for this call only + * @param string $path Request path + * @param array $parameters DELETE Parameters + * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return array Data */ public function delete($path, array $parameters = array(), array $headers = array()); @@ -70,20 +70,20 @@ public function delete($path, array $parameters = array(), array $headers = arra * Send a request to the server, receive a response, * decode the response and returns an associative array * - * @param string $path Request API path - * @param array $parameters Parameters - * @param string $httpMethod HTTP method to use - * @param array $headers Request headers + * @param string $path Request API path + * @param array $parameters Parameters + * @param string $httpMethod HTTP method to use + * @param array $headers Request headers * - * @return array Data + * @return array Data */ public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array()); /** * Change an option value. * - * @param string $name The option name - * @param mixed $value The value + * @param string $name The option name + * @param mixed $value The value * * @throws InvalidArgumentException */ @@ -95,13 +95,13 @@ public function setOption($name, $value); * @param array $headers */ public function setHeaders(array $headers); - + /** * 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) - * @param null|string $authMethod One of the AUTH_* class constants + * @param string $tokenOrLogin GitHub private token/username/client ID + * @param null|string $password GitHub password/secret (optionally can contain $authMethod) + * @param null|string $authMethod One of the AUTH_* class constants * * @throws InvalidArgumentException If no authentication method was given */ diff --git a/lib/Github/ResultPager.php b/lib/Github/ResultPager.php index 0ce7d11f595..83f2692a29a 100644 --- a/lib/Github/ResultPager.php +++ b/lib/Github/ResultPager.php @@ -3,9 +3,7 @@ namespace Github; use Github\Api\ApiInterface; -use Github\Exception\InvalidArgumentException; use Github\HttpClient\HttpClient; -use Github\HttpClient\HttpClientInterface; /** * Pager class for supporting pagination in github classes @@ -26,7 +24,6 @@ class ResultPager implements ResultPagerInterface */ protected $pagination; - /** * The Github client to use for pagination. This must be the same * instance that you got the Api instance from, i.e.: diff --git a/lib/Github/ResultPagerInterface.php b/lib/Github/ResultPagerInterface.php index 6faab5efda2..7604fd0ecea 100644 --- a/lib/Github/ResultPagerInterface.php +++ b/lib/Github/ResultPagerInterface.php @@ -21,11 +21,11 @@ public function getPagination(); /** * 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 - * @param array $parameters the method parameters in an array + * @param ApiInterface $api the Api instance + * @param string $method the method name to call on the Api instance + * @param array $parameters the method parameters in an array * - * @return array returns the result of the Api::$method() call + * @return array returns the result of the Api::$method() call */ public function fetch(ApiInterface $api, $method, array $parameters = array()); @@ -33,11 +33,11 @@ public function fetch(ApiInterface $api, $method, array $parameters = array()); * 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 - * @param array $parameters the method parameters in an array + * @param ApiInterface $api the Api instance + * @param string $method the method name to call on the Api instance + * @param array $parameters the method parameters in an array * - * @return array returns a merge of the results of the Api::$method() call + * @return array returns a merge of the results of the Api::$method() call */ public function fetchAll(ApiInterface $api, $method, array $parameters = array()); diff --git a/test/Github/Tests/Api/Issue/CommentsTest.php b/test/Github/Tests/Api/Issue/CommentsTest.php index 6e8cd9e1981..687dc3a35f7 100644 --- a/test/Github/Tests/Api/Issue/CommentsTest.php +++ b/test/Github/Tests/Api/Issue/CommentsTest.php @@ -53,7 +53,6 @@ public function shouldNotCreateWithoutBody() $api->create('KnpLabs', 'php-github-api', '123', $data); } - /** * @test */ diff --git a/test/Github/Tests/Api/Repository/ContentsDownloadFixture.php b/test/Github/Tests/Api/Repository/ContentsDownloadFixture.php index 07dece20576..a403c2feb23 100644 --- a/test/Github/Tests/Api/Repository/ContentsDownloadFixture.php +++ b/test/Github/Tests/Api/Repository/ContentsDownloadFixture.php @@ -3,4 +3,4 @@ return json_decode( '{"sha":"5639a4e6ede372d7ea25b1064be4e2045c2a053d","size":2648,"name":"ContentsTest.php","path":"test\/Github\/Tests\/Api\/Repository\/ContentsTest.php","type":"file","url":"https:\/\/api.github.com\/repos\/KnpLabs\/php-github-api\/contents\/test\/Github\/Tests\/Api\/Repository\/ContentsTest.php","git_url":"https:\/\/api.github.com\/repos\/KnpLabs\/php-github-api\/git\/blobs\/5639a4e6ede372d7ea25b1064be4e2045c2a053d","html_url":"https:\/\/github.com\/KnpLabs\/php-github-api\/blob\/master\/test\/Github\/Tests\/Api\/Repository\/ContentsTest.php","_links":{"self":"https:\/\/api.github.com\/repos\/KnpLabs\/php-github-api\/contents\/test\/Github\/Tests\/Api\/Repository\/ContentsTest.php","git":"https:\/\/api.github.com\/repos\/KnpLabs\/php-github-api\/git\/blobs\/5639a4e6ede372d7ea25b1064be4e2045c2a053d","html":"https:\/\/github.com\/KnpLabs\/php-github-api\/blob\/master\/test\/Github\/Tests\/Api\/Repository\/ContentsTest.php"},"content":"PD9waHAKCm5hbWVzcGFjZSBHaXRodWJcVGVzdHNcQXBpXFJlcG9zaXRvcnk7\nCgp1c2UgR2l0aHViXFRlc3RzXEFwaVxUZXN0Q2FzZTsKCmNsYXNzIENvbnRl\nbnRzVGVzdCBleHRlbmRzIFRlc3RDYXNlCnsKICAgIC8qKgogICAgICogQHRl\nc3QKICAgICAqLwogICAgcHVibGljIGZ1bmN0aW9uIHNob3VsZFNob3dDb250\nZW50Rm9yR2l2ZW5QYXRoKCkKICAgIHsKICAgICAgICAkZXhwZWN0ZWRWYWx1\nZSA9ICc8P3BocCAvLy4uJzsKCiAgICAgICAgJGFwaSA9ICR0aGlzLT5nZXRB\ncGlNb2NrKCk7CiAgICAgICAgJGFwaS0+ZXhwZWN0cygkdGhpcy0+b25jZSgp\nKQogICAgICAgICAgICAtPm1ldGhvZCgnZ2V0JykKICAgICAgICAgICAgLT53\naXRoKCdyZXBvcy9LbnBMYWJzL3BocC1naXRodWItYXBpL2NvbnRlbnRzL3Rl\nc3QlMkZHaXRodWIlMkZUZXN0cyUyRkFwaSUyRlJlcG9zaXRvcnklMkZDb250\nZW50c1Rlc3QucGhwJywgYXJyYXkoJ3JlZicgPT4gbnVsbCkpCiAgICAgICAg\nICAgIC0+d2lsbCgkdGhpcy0+cmV0dXJuVmFsdWUoJGV4cGVjdGVkVmFsdWUp\nKTsKCiAgICAgICAgJHRoaXMtPmFzc2VydEVxdWFscygkZXhwZWN0ZWRWYWx1\nZSwgJGFwaS0+c2hvdygnS25wTGFicycsICdwaHAtZ2l0aHViLWFwaScsICd0\nZXN0L0dpdGh1Yi9UZXN0cy9BcGkvUmVwb3NpdG9yeS9Db250ZW50c1Rlc3Qu\ncGhwJykpOwogICAgfQoKICAgIC8qKgogICAgICogQHRlc3QKICAgICAqLwog\nICAgcHVibGljIGZ1bmN0aW9uIHNob3VsZFNob3dSZWFkbWUoKQogICAgewog\nICAgICAgICRleHBlY3RlZFZhbHVlID0gJ1JFQURNRS4uLic7CgogICAgICAg\nICRhcGkgPSAkdGhpcy0+Z2V0QXBpTW9jaygpOwogICAgICAgICRhcGktPmV4\ncGVjdHMoJHRoaXMtPm9uY2UoKSkKICAgICAgICAgICAgLT5tZXRob2QoJ2dl\ndCcpCiAgICAgICAgICAgIC0+d2l0aCgncmVwb3MvS25wTGFicy9waHAtZ2l0\naHViLWFwaS9yZWFkbWUnLCBhcnJheSgncmVmJyA9PiBudWxsKSkKICAgICAg\nICAgICAgLT53aWxsKCR0aGlzLT5yZXR1cm5WYWx1ZSgkZXhwZWN0ZWRWYWx1\nZSkpOwoKICAgICAgICAkdGhpcy0+YXNzZXJ0RXF1YWxzKCRleHBlY3RlZFZh\nbHVlLCAkYXBpLT5yZWFkbWUoJ0tucExhYnMnLCAncGhwLWdpdGh1Yi1hcGkn\nKSk7CiAgICB9CgogICAgLyoqCiAgICAgKiBAdGVzdAogICAgICovCiAgICBw\ndWJsaWMgZnVuY3Rpb24gc2hvdWxkRmV0Y2hUYXJiYWxsQXJjaGl2ZVdoZW5G\nb3JtYXROb3RSZWNvZ25pemVkKCkKICAgIHsKICAgICAgICAkZXhwZWN0ZWRW\nYWx1ZSA9ICd0YXInOwoKICAgICAgICAkYXBpID0gJHRoaXMtPmdldEFwaU1v\nY2soKTsKICAgICAgICAkYXBpLT5leHBlY3RzKCR0aGlzLT5vbmNlKCkpCiAg\nICAgICAgICAgIC0+bWV0aG9kKCdnZXQnKQogICAgICAgICAgICAtPndpdGgo\nJ3JlcG9zL0tucExhYnMvcGhwLWdpdGh1Yi1hcGkvdGFyYmFsbCcsIGFycmF5\nKCdyZWYnID0+IG51bGwpKQogICAgICAgICAgICAtPndpbGwoJHRoaXMtPnJl\ndHVyblZhbHVlKCRleHBlY3RlZFZhbHVlKSk7CgogICAgICAgICR0aGlzLT5h\nc3NlcnRFcXVhbHMoJGV4cGVjdGVkVmFsdWUsICRhcGktPmFyY2hpdmUoJ0tu\ncExhYnMnLCAncGhwLWdpdGh1Yi1hcGknLCAnc29tZUZvcm1hdCcpKTsKICAg\nIH0KCiAgICAvKioKICAgICAqIEB0ZXN0CiAgICAgKi8KICAgIHB1YmxpYyBm\ndW5jdGlvbiBzaG91bGRGZXRjaFRhcmJhbGxBcmNoaXZlKCkKICAgIHsKICAg\nICAgICAkZXhwZWN0ZWRWYWx1ZSA9ICd0YXInOwoKICAgICAgICAkYXBpID0g\nJHRoaXMtPmdldEFwaU1vY2soKTsKICAgICAgICAkYXBpLT5leHBlY3RzKCR0\naGlzLT5vbmNlKCkpCiAgICAgICAgICAgIC0+bWV0aG9kKCdnZXQnKQogICAg\nICAgICAgICAtPndpdGgoJ3JlcG9zL0tucExhYnMvcGhwLWdpdGh1Yi1hcGkv\ndGFyYmFsbCcsIGFycmF5KCdyZWYnID0+IG51bGwpKQogICAgICAgICAgICAt\nPndpbGwoJHRoaXMtPnJldHVyblZhbHVlKCRleHBlY3RlZFZhbHVlKSk7Cgog\nICAgICAgICR0aGlzLT5hc3NlcnRFcXVhbHMoJGV4cGVjdGVkVmFsdWUsICRh\ncGktPmFyY2hpdmUoJ0tucExhYnMnLCAncGhwLWdpdGh1Yi1hcGknLCAndGFy\nYmFsbCcpKTsKICAgIH0KCiAgICAvKioKICAgICAqIEB0ZXN0CiAgICAgKi8K\nICAgIHB1YmxpYyBmdW5jdGlvbiBzaG91bGRGZXRjaFppcGJhbGxBcmNoaXZl\nKCkKICAgIHsKICAgICAgICAkZXhwZWN0ZWRWYWx1ZSA9ICd6aXAnOwoKICAg\nICAgICAkYXBpID0gJHRoaXMtPmdldEFwaU1vY2soKTsKICAgICAgICAkYXBp\nLT5leHBlY3RzKCR0aGlzLT5vbmNlKCkpCiAgICAgICAgICAgIC0+bWV0aG9k\nKCdnZXQnKQogICAgICAgICAgICAtPndpdGgoJ3JlcG9zL0tucExhYnMvcGhw\nLWdpdGh1Yi1hcGkvemlwYmFsbCcsIGFycmF5KCdyZWYnID0+IG51bGwpKQog\nICAgICAgICAgICAtPndpbGwoJHRoaXMtPnJldHVyblZhbHVlKCRleHBlY3Rl\nZFZhbHVlKSk7CgogICAgICAgICR0aGlzLT5hc3NlcnRFcXVhbHMoJGV4cGVj\ndGVkVmFsdWUsICRhcGktPmFyY2hpdmUoJ0tucExhYnMnLCAncGhwLWdpdGh1\nYi1hcGknLCAnemlwYmFsbCcpKTsKICAgIH0KCiAgICBwcm90ZWN0ZWQgZnVu\nY3Rpb24gZ2V0QXBpQ2xhc3MoKQogICAgewogICAgICAgIHJldHVybiAnR2l0\naHViXEFwaVxSZXBvc2l0b3J5XENvbnRlbnRzJzsKICAgIH0KfQo=\n","encoding":"base64"}', true -); \ No newline at end of file +); diff --git a/test/Github/Tests/Api/Repository/ContentsTest.php b/test/Github/Tests/Api/Repository/ContentsTest.php index 3b15118cf34..e3191af4da2 100644 --- a/test/Github/Tests/Api/Repository/ContentsTest.php +++ b/test/Github/Tests/Api/Repository/ContentsTest.php @@ -85,7 +85,7 @@ public function shouldFetchZipballArchive() $this->assertEquals($expectedValue, $api->archive('KnpLabs', 'php-github-api', 'zipball')); } - + /** * @test */ @@ -93,10 +93,10 @@ public function shouldDownloadForGivenPath() { // The show() method return $getValue = include 'ContentsDownloadFixture.php'; - + // The download() method return $expectedValue = base64_decode($getValue['content']); - + $api = $this->getApiMock(); $api->expects($this->once()) ->method('get') diff --git a/test/Github/Tests/Api/Repository/DeployKeysTest.php b/test/Github/Tests/Api/Repository/DeployKeysTest.php index 77fbbc2f662..a235bad8f0b 100644 --- a/test/Github/Tests/Api/Repository/DeployKeysTest.php +++ b/test/Github/Tests/Api/Repository/DeployKeysTest.php @@ -101,7 +101,6 @@ public function shouldCreateDeployKey() $this->assertEquals($expectedValue, $api->create('KnpLabs', 'php-github-api', $data)); } - /** * @test * @expectedException Github\Exception\MissingArgumentException diff --git a/test/Github/Tests/Api/Repository/HooksTest.php b/test/Github/Tests/Api/Repository/HooksTest.php index 444d5cc633e..6744d8c9158 100644 --- a/test/Github/Tests/Api/Repository/HooksTest.php +++ b/test/Github/Tests/Api/Repository/HooksTest.php @@ -101,7 +101,6 @@ public function shouldCreateHook() $this->assertEquals($expectedValue, $api->create('KnpLabs', 'php-github-api', $data)); } - /** * @test * @expectedException Github\Exception\MissingArgumentException diff --git a/test/Github/Tests/Api/Repository/LabelsTest.php b/test/Github/Tests/Api/Repository/LabelsTest.php index 75e5676a2da..6526ec4b3bb 100644 --- a/test/Github/Tests/Api/Repository/LabelsTest.php +++ b/test/Github/Tests/Api/Repository/LabelsTest.php @@ -101,7 +101,6 @@ public function shouldCreateLabel() $this->assertEquals($expectedValue, $api->create('KnpLabs', 'php-github-api', $data)); } - /** * @test * @expectedException Github\Exception\MissingArgumentException diff --git a/test/Github/Tests/HttpClient/Cache/FilesystemCacheTest.php b/test/Github/Tests/HttpClient/Cache/FilesystemCacheTest.php index f3655705d15..841f38f690b 100644 --- a/test/Github/Tests/HttpClient/Cache/FilesystemCacheTest.php +++ b/test/Github/Tests/HttpClient/Cache/FilesystemCacheTest.php @@ -41,4 +41,3 @@ public function shouldNotGetATimestampForInexistingFile() $this->assertNull($cache->getModifiedSince('test2')); } } - diff --git a/test/Github/Tests/Mock/TestResponse.php b/test/Github/Tests/Mock/TestResponse.php index 0c8f04b320e..3cac1212d70 100644 --- a/test/Github/Tests/Mock/TestResponse.php +++ b/test/Github/Tests/Mock/TestResponse.php @@ -27,7 +27,7 @@ public function getContent() */ public function getPagination() { - if($this->loopCount){ + if ($this->loopCount) { $returnArray = array( 'next' => 'http://github.com/' . $this->loopCount ); diff --git a/test/bootstrap.php b/test/bootstrap.php index 69436c1fb1d..416d08990eb 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -1,6 +1,7 @@