| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | protected function getMessageFromThrowable(\Throwable $throwable, ?int $statusCode = null): string |
||
| 34 | { |
||
| 35 | $showMessage = $this->messagesMap->resolveException($throwable); |
||
| 36 | |||
| 37 | if ($showMessage || $this->debug) { |
||
| 38 | return $throwable->getMessage(); |
||
| 39 | } |
||
| 40 | |||
| 41 | return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error'; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |