Skip to content

Apply fixes from StyleCI #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/Github/Api/AbstractApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,7 @@ protected function head($path, array $parameters = [], array $requestHeaders = [
unset($parameters['ref']);
}

$response = $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters), $requestHeaders);

return $response;
return $this->client->getHttpClient()->head($path.'?'.http_build_query($parameters), $requestHeaders);
}

/**
Expand Down
4 changes: 1 addition & 3 deletions lib/Github/Api/GitData/Blobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ public function configure($bodyType = null)
*/
public function show($username, $repository, $sha)
{
$response = $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha));

return $response;
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Github/Api/PullRequest/Review.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public function dismiss($username, $repository, $pullRequest, $id, $message)
}

return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id.'/dismissals', [
'message' => $message,
'message' => $message,
]);
}

Expand Down
4 changes: 1 addition & 3 deletions lib/Github/Api/Repository/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ public function create($username, $repository, $id, $name, $contentType, $conten
// Asset creation requires a separate endpoint, uploads.github.com.
// Change the base url for the HTTP client temporarily while we execute
// this request.
$response = $this->postRaw('https://uploads.github.com/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id).'/assets?name='.$name, $content, ['Content-Type' => $contentType]);

return $response;
return $this->postRaw('https://uploads.github.com/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/releases/'.rawurlencode($id).'/assets?name='.$name, $content, ['Content-Type' => $contentType]);
}

/**
Expand Down
14 changes: 7 additions & 7 deletions lib/Github/Api/Repository/Contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public function create($username, $repository, $path, $content, $message, $branc
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);

$parameters = [
'content' => base64_encode($content),
'message' => $message,
'content' => base64_encode($content),
'message' => $message,
];

if (null !== $branch) {
Expand Down Expand Up @@ -178,9 +178,9 @@ public function update($username, $repository, $path, $content, $message, $sha,
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);

$parameters = [
'content' => base64_encode($content),
'message' => $message,
'sha' => $sha,
'content' => base64_encode($content),
'message' => $message,
'sha' => $sha,
];

if (null !== $branch) {
Expand Down Expand Up @@ -219,8 +219,8 @@ public function rm($username, $repository, $path, $message, $sha, $branch = null
$url = '/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contents/'.rawurlencode($path);

$parameters = [
'message' => $message,
'sha' => $sha,
'message' => $message,
'sha' => $sha,
];

if (null !== $branch) {
Expand Down
4 changes: 2 additions & 2 deletions test/Github/Tests/Api/IssueTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function shouldGetIssues()
];
$sentData = $data + [
'page' => 1,
];
];

$api = $this->getApiMock();
$api->expects($this->once())
Expand All @@ -43,7 +43,7 @@ public function shouldGetIssuesUsingAdditionalParameters()
];
$sentData = $data + [
'page' => 1,
];
];

$api = $this->getApiMock();
$api->expects($this->once())
Expand Down
2 changes: 1 addition & 1 deletion test/Github/Tests/Api/PullRequest/CommentsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CommentsTest extends TestCase
public function shouldGetAllReviewCommentsForAPullRequest()
{
$expectedValue = [
[
[
'url' => 'https://api.github.com/repos/octocat/Hello-World/pulls/comments/1',
'id' => 1,
'pull_request_review_id' => 42,
Expand Down
2 changes: 1 addition & 1 deletion test/Github/Tests/Functional/CacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private function getCurrentUserResponse($username)
];

$body = \GuzzleHttp\Psr7\stream_for(json_encode([
'login' => $username,
'login' => $username,
]));

return new Response(200, $headers, $body);
Expand Down