| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function behave(Response $response) |
||
| 34 | { |
||
| 35 | $statusCodeIsToHigh = ($response->statusCode() > $this->statusCode); |
||
| 36 | |||
| 37 | if ($statusCodeIsToHigh) { |
||
| 38 | throw new RuntimeException( |
||
| 39 | 'limit of status code exceeded. dumping response: ' . |
||
| 40 | implode(', ', $response->convertIntoAnArray()) |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | return $response; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |