diff --git a/doc/activity.md b/doc/activity.md index c15690e9fe3..48d7cfb423d 100644 --- a/doc/activity.md +++ b/doc/activity.md @@ -24,7 +24,7 @@ Returns an array of watched repos. > *** Requires [authentication](security.md). *** -### Get repos that a authenticated user has starred +### Get repos that an authenticated user has starred ```php $activity = $client->api('current_user')->starring()->all(); @@ -38,7 +38,7 @@ $activity = $client->api('user')->events('ornicar'); ``` Returns an array of private and public events created for all repos related to the user. -### Get repos that a authenticated user has starred with creation date +### Get repos that an authenticated user has starred with creation date Support for getting the star creation timestamp in the response, using the custom `Accept: application/vnd.github.v3.star+json` header. @@ -75,7 +75,7 @@ $activity = $client->api('current_user')->starring()->unstar($owner, $repo); Throws an Exception in case of failure or NULL in case of success. -### Get repos that a authenticated user is watching +### Get repos that an authenticated user is watching ```php $activity = $client->api('current_user')->watchers()->all(); diff --git a/doc/caching.md b/doc/caching.md index a95f92e9eea..1a004cc8781 100644 --- a/doc/caching.md +++ b/doc/caching.md @@ -26,5 +26,5 @@ $client->removeCache(); ``` Using cache, the client will get cached responses if resources haven't changed since last time, -**without** reaching the `X-Rate-Limit` [imposed by github](http://developer.github.com/v3/#rate-limiting). +**without** reaching the `X-Rate-Limit` [imposed by GitHub](http://developer.github.com/v3/#rate-limiting). diff --git a/doc/currentuser/publickeys.md b/doc/currentuser/publickeys.md index a9d19018f2d..444dd58fa0c 100644 --- a/doc/currentuser/publickeys.md +++ b/doc/currentuser/publickeys.md @@ -25,7 +25,7 @@ $key = $client->me()->keys()->show(1234); $key = $client->me()->keys()->create(array('title' => 'key title', 'key' => 12345)); ``` -Adds a key with title 'key title' to the authenticated user and returns a the created key for the user. +Adds a key with title 'key title' to the authenticated user and returns the created key for the user. ### Remove a public key from the authenticated user. diff --git a/doc/customize.md b/doc/customize.md index 1d5ae51e766..b475ee57322 100644 --- a/doc/customize.md +++ b/doc/customize.md @@ -22,7 +22,7 @@ To use the symfony http client composer require symfony/http-client nyholm/psr7 ``` -To set up the github client with this http client +To set up the GitHub client with this http client ```php use Github\Client; diff --git a/doc/graphql.md b/doc/graphql.md index e9ba581c506..dfe83639085 100644 --- a/doc/graphql.md +++ b/doc/graphql.md @@ -11,7 +11,7 @@ $rateLimits = $client->api('graphql')->execute($query); #### Authentication -To use [GitHub v4 API (GraphQL API)](http://developer.github.com/v4/) requests must [authenticated](security.md). +To use [GitHub v4 API (GraphQL API)](http://developer.github.com/v4/) requests must [authenticate](security.md). ```php $client->authenticate($token, null, Github\AuthMethod::ACCESS_TOKEN); diff --git a/doc/project/projects.md b/doc/project/projects.md index 5763e0060e7..103bbe10c86 100644 --- a/doc/project/projects.md +++ b/doc/project/projects.md @@ -1,10 +1,10 @@ ## Repo / Projects API [Back to the "Repos API"](../) | [Back to the navigation](../README.md) -This api is currently only available to developers in Early Access. To access the API during the Early Access period, +This api is currently only available to developers in Early Access. To access the API during the Early Access period, you must provide a custom media type in the Accept header. -Both repositories and organisations have projects. The api is only different for gettings all or a single project. +Both repositories and organisations have projects. The api is only different for getting all or a single project. All the example use the repository projects api but this also works form the organization api (`$client->api('org_projects')`) ```php diff --git a/doc/pull_request/comments.md b/doc/pull_request/comments.md index 87ca5f8e443..e996f804989 100644 --- a/doc/pull_request/comments.md +++ b/doc/pull_request/comments.md @@ -67,7 +67,7 @@ $comment = $client->api('pull_request')->comments()->update('KnpLabs', 'php-gith This returns the details of the updated comment. -### Remove a review comment from an pull request +### Remove a review comment from a pull request > Requires [authentication](../security.md). diff --git a/doc/repo/hooks.md b/doc/repo/hooks.md index 1f89ed40405..a4f9d9af655 100644 --- a/doc/repo/hooks.md +++ b/doc/repo/hooks.md @@ -1,7 +1,7 @@ ## Repo / Hooks API [Back to the "Repos API"](../repos.md) | [Back to the navigation](../README.md) -For extended info see the [Github documentation](https://docs.github.com/en/rest/reference/repos#webhooks) +For extended info see the [GitHub documentation](https://docs.github.com/en/rest/reference/repos#webhooks) ### List repository webhooks diff --git a/doc/repos.md b/doc/repos.md index ab412dc77c2..a0f822ce446 100644 --- a/doc/repos.md +++ b/doc/repos.md @@ -310,8 +310,8 @@ $activity = $client->api('repo')->activity('ornicar', 'php-github-api'); Returns an array of commit activity group by week. ### `Moved` repositories -Github repositories can be moved to another org/user, but it remains the `id`. -In case if you can't no more find repo, you can retrieve it by `id`: +GitHub repositories can be moved to another org/user, but it remains the `id`. +In case you can't find the repo anymore, you can retrieve it by `id`: ```php use Github\HttpClient\Message\ResponseMediator; @@ -365,7 +365,7 @@ $repo = $client->api('repo')->transfer('KnpLabs', 'php-github-api', 'github', [1 ### Create a repository dispatch event -Example when you want to configure custom github action workflows. +Example when you want to configure custom GitHub action workflows. ```php $client->api('repo')->dispatch('KnpLabs', 'php-github-api', 'acme-event', ['foo'=>'bar']); diff --git a/doc/request_response_info.md b/doc/request_response_info.md index 880e7f85a22..32e30981ea4 100644 --- a/doc/request_response_info.md +++ b/doc/request_response_info.md @@ -3,7 +3,7 @@ ### Get response headers -Get the repsonse header for the latest request +Get the response header for the latest request ``` $headers = $githubClient->getLastResponse()->getHeaders(); diff --git a/doc/result_pager.md b/doc/result_pager.md index b13432cb569..f074f1cc4a1 100644 --- a/doc/result_pager.md +++ b/doc/result_pager.md @@ -3,7 +3,7 @@ ### Usage examples -#### Get all repositories of a organization +#### Get all repositories of an organization ```php $client = new Github\Client(); @@ -21,7 +21,7 @@ Parameters of the `fetchAll` method: * The method of the API object you're using * The parameters of the method -Parameters are passed to the API method via [call_user_func_array](https://www.php.net/manual/en/function.call-user-func-array.php). +Parameters are passed to the API method via [call_user_func_array](https://www.php.net/manual/en/function.call-user-func-array.php). ```php $parameters = array('github', 'all', 1); // $organization, $type, $page diff --git a/doc/security.md b/doc/security.md index 7aed2f9806c..a8596de20b1 100644 --- a/doc/security.md +++ b/doc/security.md @@ -33,7 +33,7 @@ further requests are done as the given user. ### Authenticating as an Integration To authenticate as an integration you need to supply a JSON Web Token with `Github\AuthMethod::JWT` to request -and installation access token which is then usable with `Github\AuthMethod::ACCESS_TOKEN`. [Github´s integration +and installation access token which is then usable with `Github\AuthMethod::ACCESS_TOKEN`. [GitHub´s integration authentication docs](https://developer.github.com/apps/building-github-apps/authentication-options-for-github-apps/#authenticating-as-a-github-app) describe the flow in detail. It´s important for integration requests to use the custom Accept header `application/vnd.github.machine-man-preview`. @@ -67,5 +67,5 @@ $jwt = $config->builder(ChainedFormatter::withUnixTimestampDates()) $github->authenticate($jwt->toString(), null, Github\AuthMethod::JWT); ``` -The `$integrationId` you can find in the about section of your github app. +The `$integrationId` you can find in the about section of your GitHub app. The `$installationId` you can find by installing the app and using the id in the url. diff --git a/doc/testing.md b/doc/testing.md index ec2effb3b5c..36df32097eb 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -4,7 +4,7 @@ ### Run Test Suite -The code is unit tested, there are also some functional tests. To run tests on +The code is unit tested, there are also some functional tests. To run tests on your machine, from a CLI, run ```bash @@ -14,12 +14,12 @@ $ phpunit ### Write tests -It is always great if someone wants to contribute and extend the functionality of -the API client. But all new features must be properly tested. To test a new API -function, one should test its communication with the HTTP client. The code should -never make an actual call to Github. Testing could easily be done with mocking. +It is always great if someone wants to contribute and extend the functionality of +the API client. But all new features must be properly tested. To test a new API +function, one should test its communication with the HTTP client. The code should +never make an actual call to GitHub. Testing could easily be done with mocking. -If you want to write test for the function that shows you comments to a gist. +If you want to write test for the function that shows you comments to a gist. ```php class Comments extends AbstractApi @@ -32,7 +32,7 @@ class Comments extends AbstractApi } ``` -The test will look like this: +The test will look like this: ```php use Github\Tests\Api\TestCase; @@ -51,7 +51,7 @@ class CommentsTest extends TestCase // Get the API mock (see "getApiClass" below). $api = $this->getApiMock(); - + $api->expects($this->once()) // Expect one call ->method('get') // A GET request ->with('/gists/123/comments/456') // URI should be "/gists/123/comments/456" @@ -59,14 +59,14 @@ class CommentsTest extends TestCase // Call Comments::show $result = $api->show(123, 456); - - // Verify that the result is the "Server response" as we expect. + + // Verify that the result is the "Server response" as we expect. $this->assertEquals($expectedValue, $result); } - + protected function getApiClass() { - // Tell the "getAPIMock" what class to mock. + // Tell the "getAPIMock" what class to mock. return \Github\Api\Gist\Comments::class; } } diff --git a/doc/two_factor_authentication.md b/doc/two_factor_authentication.md index 46e84e0daa5..3b58de49abc 100644 --- a/doc/two_factor_authentication.md +++ b/doc/two_factor_authentication.md @@ -1,4 +1,4 @@ -## Two factor authentication +## Two-factor authentication [Back to the navigation](README.md) diff --git a/doc/users.md b/doc/users.md index dbc6a6bb302..48bb0d7dc15 100644 --- a/doc/users.md +++ b/doc/users.md @@ -33,7 +33,7 @@ $user = $client->api('user')->show('KnpLabs'); Returns an array of information about the user. -You can also use the User ID, but it will use an undocumented Github API +You can also use the User ID, but it will use an undocumented GitHub API ```php $user = $client->api('user')->showById(202732);