From 65a03c5006d63327211f94d3c8698f2df70b2ade Mon Sep 17 00:00:00 2001 From: Tim Massey Date: Mon, 8 Apr 2013 09:56:44 +1000 Subject: [PATCH 1/2] Adding ability to pass $params into pullRequest::all() --- lib/Github/Api/PullRequest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index 5cb9b6d96ec..09ee947a1a7 100644 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -24,9 +24,10 @@ class PullRequest extends AbstractApi * * @return array array of pull requests for the project */ - public function all($username, $repository, $state = null) + public function all($username, $repository, $state = null, array $params=array()) { - return $this->get('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls', array('state' => $state)); + $params['state'] = $state; + return $this->get('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls', $params); } /** From d60ed4e46553290de5f1cb9c10cc6ea8783367b2 Mon Sep 17 00:00:00 2001 From: Tim Massey Date: Mon, 8 Apr 2013 09:58:42 +1000 Subject: [PATCH 2/2] Spacing... --- lib/Github/Api/PullRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Github/Api/PullRequest.php b/lib/Github/Api/PullRequest.php index 09ee947a1a7..455018a265c 100644 --- a/lib/Github/Api/PullRequest.php +++ b/lib/Github/Api/PullRequest.php @@ -26,7 +26,7 @@ class PullRequest extends AbstractApi */ public function all($username, $repository, $state = null, array $params=array()) { - $params['state'] = $state; + $params['state'] = $state; return $this->get('repos/'.urlencode($username).'/'.urlencode($repository).'/pulls', $params); }