Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 4.125 |
Changes | 0 |
1 | <?php |
||
20 | /** |
||
21 | * Method checks whether the response is an error |
||
22 | * |
||
23 | * @param ResponseInterface $response |
||
24 | * @return false|string the error text or boolean `false`, when the response is not an error |
||
25 | 2 | */ |
|
26 | public function getResponseError(ResponseInterface $response) |
||
27 | 2 | { |
|
28 | 2 | $code = $response->getStatusCode(); |
|
29 | 2 | if ($code >= 200 && $code < 300) { |
|
30 | return false; |
||
31 | } |
||
32 | |||
37 |