| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 4.128 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | 4 | protected function getExceptionMessage(\Exception $exception, $statusCode = null) |
|
| 48 | { |
||
| 49 | 4 | $showMessage = $this->resolveValue(get_class($exception), $this->messagesMap); |
|
| 50 | |||
| 51 | 4 | if ($showMessage || $this->debug) { |
|
| 52 | 4 | return $exception->getMessage(); |
|
| 53 | } |
||
| 54 | |||
| 55 | return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error'; |
||
| 56 | } |
||
| 57 | } |
||
| 58 |