| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 52 | 7 | protected function getMessageFromThrowable(\Throwable $throwable, $statusCode = null) |
|
| 53 | { |
||
| 54 | 7 | $showMessage = $this->messagesMap->resolveThrowable($throwable); |
|
|
|
|||
| 55 | |||
| 56 | 7 | if ($showMessage || $this->debug) { |
|
| 57 | 6 | return $throwable->getMessage(); |
|
| 58 | } |
||
| 59 | |||
| 60 | 1 | return array_key_exists($statusCode, Response::$statusTexts) ? Response::$statusTexts[$statusCode] : 'error'; |
|
| 61 | } |
||
| 62 | } |
||
| 63 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.