diff --git a/CHANGELOG.md b/CHANGELOG.md index bd1436f000d..080fbee39ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ $github = new Github\Client($httpClient); $github = new Github\Client(new Github\HttpClient\Builder($httpClient)); $github = Github\Client::createWithHttpClient($httpClient); ``` - +- Renamed the currentuser `DeployKeys` api class to `PublicKeys` to reflect to github api name. ## 2.0.0-rc4 diff --git a/doc/README.md b/doc/README.md index 93bdf307335..d74f2d32594 100644 --- a/doc/README.md +++ b/doc/README.md @@ -5,7 +5,7 @@ APIs: * [Authorizations](authorizations.md) * [Commits](commits.md) * Current User - * [Deploy keys / Public keys](currentuser/deploykeys.md) + * [Public keys](currentuser/publickeys.md) * [Memberships](currentuser/memberships.md) * [Enterprise](enterprise.md) * [Gists](gists.md) diff --git a/doc/currentuser/deploykeys.md b/doc/currentuser/publickeys.md similarity index 100% rename from doc/currentuser/deploykeys.md rename to doc/currentuser/publickeys.md diff --git a/lib/Github/Api/CurrentUser.php b/lib/Github/Api/CurrentUser.php index bbaea2daafb..dc2a877d7e3 100644 --- a/lib/Github/Api/CurrentUser.php +++ b/lib/Github/Api/CurrentUser.php @@ -2,7 +2,7 @@ namespace Github\Api; -use Github\Api\CurrentUser\DeployKeys; +use Github\Api\CurrentUser\PublicKeys; use Github\Api\CurrentUser\Emails; use Github\Api\CurrentUser\Followers; use Github\Api\CurrentUser\Memberships; @@ -64,11 +64,11 @@ public function issues(array $params = array(), $includeOrgIssues = true) } /** - * @return DeployKeys + * @return PublicKeys */ public function keys() { - return new DeployKeys($this->client); + return new PublicKeys($this->client); } /** diff --git a/lib/Github/Api/CurrentUser/DeployKeys.php b/lib/Github/Api/CurrentUser/PublicKeys.php similarity index 97% rename from lib/Github/Api/CurrentUser/DeployKeys.php rename to lib/Github/Api/CurrentUser/PublicKeys.php index 2d53d1a87a8..418e78b8639 100644 --- a/lib/Github/Api/CurrentUser/DeployKeys.php +++ b/lib/Github/Api/CurrentUser/PublicKeys.php @@ -9,7 +9,7 @@ * @link http://developer.github.com/v3/users/keys/ * @author Joseph Bielawski */ -class DeployKeys extends AbstractApi +class PublicKeys extends AbstractApi { /** * List deploy keys for the authenticated user. diff --git a/test/Github/Tests/Api/CurrentUser/DeployKeysTest.php b/test/Github/Tests/Api/CurrentUser/DeployKeysTest.php index 33149397193..bb03fa70339 100644 --- a/test/Github/Tests/Api/CurrentUser/DeployKeysTest.php +++ b/test/Github/Tests/Api/CurrentUser/DeployKeysTest.php @@ -104,6 +104,6 @@ public function shouldRemoveKey() */ protected function getApiClass() { - return \Github\Api\CurrentUser\DeployKeys::class; + return \Github\Api\CurrentUser\PublicKeys::class; } } diff --git a/test/Github/Tests/Api/CurrentUserTest.php b/test/Github/Tests/Api/CurrentUserTest.php index c062494179f..355c0498538 100644 --- a/test/Github/Tests/Api/CurrentUserTest.php +++ b/test/Github/Tests/Api/CurrentUserTest.php @@ -91,7 +91,7 @@ public function shouldGetDeployKeysApiObject() { $api = $this->getApiMock(); - $this->assertInstanceOf(\Github\Api\CurrentUser\DeployKeys::class, $api->keys()); + $this->assertInstanceOf(\Github\Api\CurrentUser\PublicKeys::class, $api->keys()); } /**