Skip to content

Commit b4f3acd

Browse files
author
Thibaud Fabre
committed
Formatting
1 parent f9d2df8 commit b4f3acd

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

lib/Github/Api/Repository/Contents.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,9 @@ public function exists($username, $repository, $path, $reference = null)
118118
if ($response->getStatusCode() != 200) {
119119
return false;
120120
}
121-
}
122-
catch (TwoFactorAuthenticationRequiredException $ex) {
121+
} catch (TwoFactorAuthenticationRequiredException $ex) {
123122
throw $ex;
124-
}
125-
catch (\Exception $ex) {
123+
} catch (\Exception $ex) {
126124
return false;
127125
}
128126

test/Github/Tests/Api/Repository/ContentsTest.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,6 @@ public function shouldReturnTrueWhenFileExists()
6161
$this->assertEquals(true, $api->exists('KnpLabs', 'php-github-api', 'composer.json'));
6262
}
6363

64-
private function getGuzzleResponseMock()
65-
{
66-
$responseMock = $this->getMockBuilder('\Guzzle\Http\Message\Response')
67-
->disableOriginalConstructor()
68-
->getMock();
69-
70-
return $responseMock;
71-
}
72-
7364
public function getFailureStubsForExistsTest()
7465
{
7566
$nonOkResponseMock =$this->getGuzzleResponseMock();
@@ -324,4 +315,14 @@ protected function getApiClass()
324315
{
325316
return 'Github\Api\Repository\Contents';
326317
}
318+
319+
320+
private function getGuzzleResponseMock()
321+
{
322+
$responseMock = $this->getMockBuilder('\Guzzle\Http\Message\Response')
323+
->disableOriginalConstructor()
324+
->getMock();
325+
326+
return $responseMock;
327+
}
327328
}

0 commit comments

Comments
 (0)