Skip to content

Commit c659249

Browse files
Fixed a load of docblocks
1 parent 40cbb26 commit c659249

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+558
-395
lines changed

lib/Github/Api/AbstractApi.php

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
use Github\HttpClient\Message\ResponseMediator;
77

88
/**
9-
* Abstract class for Api classes
9+
* Abstract class for Api classes.
1010
*
1111
* @author Joseph Bielawski <stloyd@gmail.com>
1212
*/
1313
abstract class AbstractApi implements ApiInterface
1414
{
1515
/**
16-
* The client
16+
* The client.
1717
*
1818
* @var Client
1919
*/
2020
protected $client;
2121

2222
/**
23-
* number of items per page (GitHub pagination)
23+
* Number of items per page (GitHub pagination).
2424
*
2525
* @var null|int
2626
*/
@@ -59,9 +59,10 @@ public function setPerPage($perPage)
5959
/**
6060
* Send a GET request with query parameters.
6161
*
62-
* @param string $path Request path.
63-
* @param array $parameters GET parameters.
64-
* @param array $requestHeaders Request Headers.
62+
* @param string $path Request path.
63+
* @param array $parameters GET parameters.
64+
* @param array $requestHeaders Request Headers.
65+
*
6566
* @return \Guzzle\Http\EntityBodyInterface|mixed|string
6667
*/
6768
protected function get($path, array $parameters = array(), $requestHeaders = array())
@@ -78,11 +79,12 @@ protected function get($path, array $parameters = array(), $requestHeaders = arr
7879
}
7980

8081
/**
81-
* Send a HEAD request with query parameters
82+
* Send a HEAD request with query parameters.
83+
*
84+
* @param string $path Request path.
85+
* @param array $parameters HEAD parameters.
86+
* @param array $requestHeaders Request headers.
8287
*
83-
* @param string $path Request path.
84-
* @param array $parameters HEAD parameters.
85-
* @param array $requestHeaders Request headers.
8688
* @return \Guzzle\Http\Message\Response
8789
*/
8890
protected function head($path, array $parameters = array(), $requestHeaders = array())
@@ -101,9 +103,9 @@ protected function head($path, array $parameters = array(), $requestHeaders = ar
101103
/**
102104
* Send a POST request with JSON-encoded parameters.
103105
*
104-
* @param string $path Request path.
105-
* @param array $parameters POST parameters to be JSON encoded.
106-
* @param array $requestHeaders Request headers.
106+
* @param string $path Request path.
107+
* @param array $parameters POST parameters to be JSON encoded.
108+
* @param array $requestHeaders Request headers.
107109
*/
108110
protected function post($path, array $parameters = array(), $requestHeaders = array())
109111
{
@@ -117,9 +119,10 @@ protected function post($path, array $parameters = array(), $requestHeaders = ar
117119
/**
118120
* Send a POST request with raw data.
119121
*
120-
* @param string $path Request path.
122+
* @param string $path Request path.
121123
* @param $body Request body.
122-
* @param array $requestHeaders Request headers.
124+
* @param array $requestHeaders Request headers.
125+
*
123126
* @return \Guzzle\Http\EntityBodyInterface|mixed|string
124127
*/
125128
protected function postRaw($path, $body, $requestHeaders = array())
@@ -136,9 +139,9 @@ protected function postRaw($path, $body, $requestHeaders = array())
136139
/**
137140
* Send a PATCH request with JSON-encoded parameters.
138141
*
139-
* @param string $path Request path.
140-
* @param array $parameters POST parameters to be JSON encoded.
141-
* @param array $requestHeaders Request headers.
142+
* @param string $path Request path.
143+
* @param array $parameters POST parameters to be JSON encoded.
144+
* @param array $requestHeaders Request headers.
142145
*/
143146
protected function patch($path, array $parameters = array(), $requestHeaders = array())
144147
{
@@ -154,9 +157,9 @@ protected function patch($path, array $parameters = array(), $requestHeaders = a
154157
/**
155158
* Send a PUT request with JSON-encoded parameters.
156159
*
157-
* @param string $path Request path.
158-
* @param array $parameters POST parameters to be JSON encoded.
159-
* @param array $requestHeaders Request headers.
160+
* @param string $path Request path.
161+
* @param array $parameters POST parameters to be JSON encoded.
162+
* @param array $requestHeaders Request headers.
160163
*/
161164
protected function put($path, array $parameters = array(), $requestHeaders = array())
162165
{
@@ -172,9 +175,9 @@ protected function put($path, array $parameters = array(), $requestHeaders = arr
172175
/**
173176
* Send a DELETE request with JSON-encoded parameters.
174177
*
175-
* @param string $path Request path.
176-
* @param array $parameters POST parameters to be JSON encoded.
177-
* @param array $requestHeaders Request headers.
178+
* @param string $path Request path.
179+
* @param array $parameters POST parameters to be JSON encoded.
180+
* @param array $requestHeaders Request headers.
178181
*/
179182
protected function delete($path, array $parameters = array(), $requestHeaders = array())
180183
{
@@ -190,7 +193,8 @@ protected function delete($path, array $parameters = array(), $requestHeaders =
190193
/**
191194
* Create a JSON encoded version of an array of parameters.
192195
*
193-
* @param array $parameters Request parameters
196+
* @param array $parameters Request parameters
197+
*
194198
* @return null|string
195199
*/
196200
protected function createJsonBody(array $parameters)

lib/Github/Api/ApiInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Github\Api;
44

55
/**
6-
* Api interface
6+
* Api interface.
77
*
88
* @author Joseph Bielawski <stloyd@gmail.com>
99
*/

lib/Github/Api/Authorizations.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Github\Api\AbstractApi;
66

77
/**
8-
* Creating, deleting and listing authorizations
8+
* Creating, deleting and listing authorizations.
99
*
1010
* @link http://developer.github.com/v3/oauth/
1111
*/

lib/Github/Api/CurrentUser.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* @link http://developer.github.com/v3/users/
1414
* @author Joseph Bielawski <stloyd@gmail.com>
15-
* @revised Felipe Valtl de Mello <eu@felipe.im>
15+
* @author Felipe Valtl de Mello <eu@felipe.im>
1616
*/
1717
class CurrentUser extends AbstractApi
1818
{
@@ -52,8 +52,8 @@ public function followers($page = 1)
5252
/**
5353
* @link http://developer.github.com/v3/issues/#list-issues
5454
*
55-
* @param array $params
56-
* @param boolean $includeOrgIssues
55+
* @param array $params
56+
* @param bool $includeOrgIssues
5757
*
5858
* @return array
5959
*/
@@ -101,10 +101,10 @@ public function teams()
101101
/**
102102
* @link http://developer.github.com/v3/repos/#list-your-repositories
103103
*
104-
* @param string $type role in the repository
105-
* @param string $sort sort by
106-
* @param string $direction direction of sort, ask or desc
107-
104+
* @param string $type role in the repository
105+
* @param string $sort sort by
106+
* @param string $direction direction of sort, ask or desc
107+
*
108108
* @return array
109109
*/
110110
public function repositories($type = 'owner', $sort = 'full_name', $direction = 'asc')

lib/Github/Api/CurrentUser/DeployKeys.php

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
class DeployKeys extends AbstractApi
1313
{
1414
/**
15-
* List deploy keys for the authenticated user
15+
* List deploy keys for the authenticated user.
16+
*
1617
* @link http://developer.github.com/v3/repos/keys/
1718
*
1819
* @return array
@@ -23,10 +24,12 @@ public function all()
2324
}
2425

2526
/**
26-
* Shows deploy key for the authenticated user
27+
* Shows deploy key for the authenticated user.
28+
*
2729
* @link http://developer.github.com/v3/repos/keys/
2830
*
29-
* @param string $id
31+
* @param string $id
32+
*
3033
* @return array
3134
*/
3235
public function show($id)
@@ -35,13 +38,15 @@ public function show($id)
3538
}
3639

3740
/**
38-
* Adds deploy key for the authenticated user
41+
* Adds deploy key for the authenticated user.
42+
*
3943
* @link http://developer.github.com/v3/repos/keys/
4044
*
41-
* @param array $params
42-
* @return array
45+
* @param array $params
4346
*
4447
* @throws MissingArgumentException
48+
*
49+
* @return array
4550
*/
4651
public function create(array $params)
4752
{
@@ -53,14 +58,16 @@ public function create(array $params)
5358
}
5459

5560
/**
56-
* Updates deploy key for the authenticated user
61+
* Updates deploy key for the authenticated user.
62+
*
5763
* @link http://developer.github.com/v3/repos/keys/
5864
*
59-
* @param string $id
60-
* @param array $params
61-
* @return array
65+
* @param string $id
66+
* @param array $params
6267
*
6368
* @throws MissingArgumentException
69+
*
70+
* @return array
6471
*/
6572
public function update($id, array $params)
6673
{
@@ -72,10 +79,12 @@ public function update($id, array $params)
7279
}
7380

7481
/**
75-
* Removes deploy key for the authenticated user
82+
* Removes deploy key for the authenticated user.
83+
*
7684
* @link http://developer.github.com/v3/repos/keys/
7785
*
78-
* @param string $id
86+
* @param string $id
87+
*
7988
* @return array
8089
*/
8190
public function remove($id)

lib/Github/Api/CurrentUser/Emails.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
class Emails extends AbstractApi
1313
{
1414
/**
15-
* List emails for the authenticated user
15+
* List emails for the authenticated user.
16+
*
1617
* @link http://developer.github.com/v3/users/emails/
1718
*
1819
* @return array
@@ -23,13 +24,15 @@ public function all()
2324
}
2425

2526
/**
26-
* Adds one or more email for the authenticated user
27+
* Adds one or more email for the authenticated user.
28+
*
2729
* @link http://developer.github.com/v3/users/emails/
2830
*
29-
* @param string|array $emails
30-
* @return array
31+
* @param string|array $emails
3132
*
3233
* @throws InvalidArgumentException
34+
*
35+
* @return array
3336
*/
3437
public function add($emails)
3538
{
@@ -43,13 +46,15 @@ public function add($emails)
4346
}
4447

4548
/**
46-
* Removes one or more email for the authenticated user
49+
* Removes one or more email for the authenticated user.
50+
*
4751
* @link http://developer.github.com/v3/users/emails/
4852
*
49-
* @param string|array $emails
50-
* @return array
53+
* @param string|array $emails
5154
*
5255
* @throws InvalidArgumentException
56+
*
57+
* @return array
5358
*/
5459
public function remove($emails)
5560
{

lib/Github/Api/CurrentUser/Followers.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
class Followers extends AbstractApi
1212
{
1313
/**
14-
* List followed users by the authenticated user
14+
* List followed users by the authenticated user.
15+
*
1516
* @link http://developer.github.com/v3/repos/followers/
1617
*
17-
* @param integer $page
18+
* @param int $page
19+
*
1820
* @return array
1921
*/
2022
public function all($page = 1)
@@ -25,10 +27,12 @@ public function all($page = 1)
2527
}
2628

2729
/**
28-
* Check that the authenticated user follows a user
30+
* Check that the authenticated user follows a user.
31+
*
2932
* @link http://developer.github.com/v3/repos/followers/
3033
*
31-
* @param string $username the username to follow
34+
* @param string $username the username to follow
35+
*
3236
* @return array
3337
*/
3438
public function check($username)
@@ -37,10 +41,12 @@ public function check($username)
3741
}
3842

3943
/**
40-
* Make the authenticated user follow a user
44+
* Make the authenticated user follow a user.
45+
*
4146
* @link http://developer.github.com/v3/repos/followers/
4247
*
43-
* @param string $username the username to follow
48+
* @param string $username the username to follow
49+
*
4450
* @return array
4551
*/
4652
public function follow($username)
@@ -49,10 +55,12 @@ public function follow($username)
4955
}
5056

5157
/**
52-
* Make the authenticated user un-follow a user
58+
* Make the authenticated user un-follow a user.
59+
*
5360
* @link http://developer.github.com/v3/repos/followers/
5461
*
55-
* @param string $username the username to un-follow
62+
* @param string $username the username to un-follow
63+
*
5664
* @return array
5765
*/
5866
public function unfollow($username)

0 commit comments

Comments
 (0)