| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 52 | 6 | protected function getExceptionMessage(\Exception $exception, $statusCode = null) |
|
| 53 | { |
||
| 54 | 6 | $showMessage = $this->messagesMap->resolveException($exception); |
|
| 55 | |||
| 56 | 6 | if ($showMessage || $this->debug) { |
|
| 57 | 5 | return $exception->getMessage(); |
|
| 58 | } |
||
| 59 | |||
| 60 | 1 | return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error'; |
|
| 61 | } |
||
| 62 | } |
||
| 63 |