component/admin/vendor/joomla/github/src/AbstractGithubObject.php 1 location
|
@@ 157-163 (lines=7) @@
|
| 154 |
|
protected function processResponse(Response $response, $expectedCode = 200) |
| 155 |
|
{ |
| 156 |
|
// Validate the response code. |
| 157 |
|
if ($response->code != $expectedCode) |
| 158 |
|
{ |
| 159 |
|
// Decode the error response and throw an exception. |
| 160 |
|
$error = json_decode($response->body); |
| 161 |
|
$message = isset($error->message) ? $error->message : 'Invalid response received from GitHub.'; |
| 162 |
|
throw new UnexpectedResponseException($response, $message, $response->code); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
return json_decode($response->body); |
| 166 |
|
} |
component/admin/vendor/joomla/github/src/Package/Gitignore.php 1 location
|
@@ 71-77 (lines=7) @@
|
| 68 |
|
$response = $this->client->get($this->fetchUrl($path), $headers); |
| 69 |
|
|
| 70 |
|
// Validate the response code. |
| 71 |
|
if ($response->code != 200) |
| 72 |
|
{ |
| 73 |
|
// Decode the error response and throw an exception. |
| 74 |
|
$error = json_decode($response->body); |
| 75 |
|
$message = isset($error->message) ? $error->message : 'Invalid response received from GitHub.'; |
| 76 |
|
throw new UnexpectedResponseException($response, $message, $response->code); |
| 77 |
|
} |
| 78 |
|
|
| 79 |
|
return ($raw) ? $response->body : json_decode($response->body); |
| 80 |
|
} |
component/admin/vendor/joomla/github/src/Package/Markdown.php 1 location
|
@@ 64-70 (lines=7) @@
|
| 61 |
|
$response = $this->client->post($this->fetchUrl($path), $data); |
| 62 |
|
|
| 63 |
|
// Validate the response code. |
| 64 |
|
if ($response->code != 200) |
| 65 |
|
{ |
| 66 |
|
// Decode the error response and throw an exception. |
| 67 |
|
$error = json_decode($response->body); |
| 68 |
|
$message = isset($error->message) ? $error->message : 'Invalid response received from GitHub.'; |
| 69 |
|
throw new UnexpectedResponseException($response, $message, $response->code); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
return $response->body; |
| 73 |
|
} |
component/admin/vendor/joomla/github/src/Package/Repositories/Commits.php 1 location
|
@@ 101-107 (lines=7) @@
|
| 98 |
|
$response = $this->client->get($this->fetchUrl($path)); |
| 99 |
|
|
| 100 |
|
// Validate the response code. |
| 101 |
|
if ($response->code != 200) |
| 102 |
|
{ |
| 103 |
|
// Decode the error response and throw an exception. |
| 104 |
|
$error = json_decode($response->body); |
| 105 |
|
$message = isset($error->message) ? $error->message : 'Invalid response received from GitHub.'; |
| 106 |
|
throw new UnexpectedResponseException($response, $message, $response->code); |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
return $response->body; |
| 110 |
|
} |