| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | public function formatException(Exception $exception) |
||
| 42 | { |
||
| 43 | if ($exception instanceof HttpException) { |
||
| 44 | return $this->formatter->formatResponse($exception->getResponse()); |
||
| 45 | } |
||
| 46 | |||
| 47 | if ($exception instanceof TransferException) { |
||
| 48 | return $exception->getMessage(); |
||
| 49 | } |
||
| 50 | |||
| 51 | return sprintf('Unexpected exception of type "%s"', get_class($exception)); |
||
| 52 | } |
||
| 53 | |||
| 70 |