From dc2c8f60ec76b9a4673b89ca463dc4bb2b64fbbc Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Thu, 8 Oct 2015 10:02:40 +0200 Subject: [PATCH] Add return fixer --- .styleci.yml | 1 + lib/Github/Api/Deployment.php | 1 + lib/Github/Api/Repository/Commits.php | 1 + lib/Github/Api/User.php | 1 + 4 files changed, 4 insertions(+) diff --git a/.styleci.yml b/.styleci.yml index e92503292bf..418a93eb0f1 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -2,3 +2,4 @@ preset: psr2 enabled: - long_array_syntax + - return diff --git a/lib/Github/Api/Deployment.php b/lib/Github/Api/Deployment.php index c86e7a073ab..eecee8d115b 100644 --- a/lib/Github/Api/Deployment.php +++ b/lib/Github/Api/Deployment.php @@ -67,6 +67,7 @@ public function updateStatus($username, $repository, $id, array $params) if (!isset($params['state'])) { throw new MissingArgumentException(array('state')); } + return $this->post('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id).'/statuses', $params); } diff --git a/lib/Github/Api/Repository/Commits.php b/lib/Github/Api/Repository/Commits.php index 9098498684a..d8d45c73cd3 100644 --- a/lib/Github/Api/Repository/Commits.php +++ b/lib/Github/Api/Repository/Commits.php @@ -21,6 +21,7 @@ public function compare($username, $repository, $base, $head, $mediaType = null) if (null !== $mediaType) { $headers['Accept'] = $mediaType; } + return $this->get('repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/compare/'.rawurlencode($base).'...'.rawurlencode($head), array(), $headers); } diff --git a/lib/Github/Api/User.php b/lib/Github/Api/User.php index 0cc707b0bd7..888eb9dfed4 100644 --- a/lib/Github/Api/User.php +++ b/lib/Github/Api/User.php @@ -39,6 +39,7 @@ public function all($id = null) if (!is_int($id)) { return $this->get('users'); } + return $this->get('users?since=' . rawurldecode($id)); }