Skip to content

Commit 07cb9e4

Browse files
committed
update configure() to be chainable per KnpLabs#544
1 parent debf2b3 commit 07cb9e4

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

lib/Github/Api/Gist/Comments.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class Comments extends AbstractApi
1818
*
1919
* @link https://developer.github.com/v3/gists/comments/#custom-media-types
2020
* @param string|null $bodyType
21+
*
22+
* @return self
2123
*/
2224
public function configure($bodyType = null)
2325
{
@@ -26,6 +28,8 @@ public function configure($bodyType = null)
2628
}
2729

2830
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType);
31+
32+
return $this;
2933
}
3034

3135
/**

lib/Github/Api/Gists.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Gists extends AbstractApi
2121
*
2222
* @link https://developer.github.com/v3/gists/#custom-media-types
2323
* @param string|null $bodyType
24+
*
25+
* @return self
2426
*/
2527
public function configure($bodyType = null)
2628
{
@@ -29,6 +31,8 @@ public function configure($bodyType = null)
2931
}
3032

3133
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s', $this->client->getApiVersion(), $bodyType);
34+
35+
return $this;
3236
}
3337

3438
public function all($type = null)

lib/Github/Api/Issue.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ class Issue extends AbstractApi
2626
*
2727
* @link https://developer.github.com/v3/issues/#custom-media-types
2828
* @param string|null $bodyType
29+
*
30+
* @return self
2931
*/
3032
public function configure($bodyType = null)
3133
{
@@ -34,6 +36,8 @@ public function configure($bodyType = null)
3436
}
3537

3638
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $this->client->getApiVersion(), $bodyType);
39+
40+
return $this;
3741
}
3842

3943
/**

lib/Github/Api/PullRequest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class PullRequest extends AbstractApi
2323
* @link https://developer.github.com/v3/pulls/#custom-media-types
2424
* @param string|null $bodyType
2525
* @param string|null $apiVersion
26+
*
27+
* @return self
2628
*/
2729
public function configure($bodyType = null, $apiVersion = null)
2830
{
@@ -39,6 +41,8 @@ public function configure($bodyType = null, $apiVersion = null)
3941
}
4042

4143
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s', $this->client->getApiVersion(), $bodyType);
44+
45+
return $this;
4246
}
4347

4448
/**

lib/Github/Api/PullRequest/Comments.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class Comments extends AbstractApi
2020
* @link https://developer.github.com/v3/pulls/comments/#custom-media-types
2121
* @param string|null $bodyType
2222
* @param string|null @apiVersion
23+
*
24+
* @return self
2325
*/
2426
public function configure($bodyType = null, $apiVersion = null)
2527
{
@@ -32,6 +34,8 @@ public function configure($bodyType = null, $apiVersion = null)
3234
}
3335

3436
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s+json', $apiVersion, $bodyType);
37+
38+
return $this;
3539
}
3640

3741
public function all($username, $repository, $pullRequest = null)

lib/Github/Api/Repository/Contents.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class Contents extends AbstractApi
2222
*
2323
* @link https://developer.github.com/v3/repo/contents/#custom-media-types
2424
* @param string|null $bodyType
25+
*
26+
* @return self
2527
*/
2628
public function configure($bodyType = null)
2729
{
@@ -30,6 +32,8 @@ public function configure($bodyType = null)
3032
}
3133

3234
$this->acceptHeaderValue = sprintf('application/vnd.github.%s.%s', $this->client->getApiVersion(), $bodyType);
35+
36+
return $this;
3337
}
3438

3539
/**

0 commit comments

Comments
 (0)