| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class BackendHandler |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Render exception. |
||
| 18 | * |
||
| 19 | * @param \Exception $exception |
||
| 20 | * |
||
| 21 | * @return string |
||
| 22 | */ |
||
| 23 | public static function renderException(\Exception $exception) |
||
| 24 | { |
||
| 25 | $error = new MessageBag([ |
||
| 26 | 'type' => get_class($exception), |
||
| 27 | 'message' => $exception->getMessage(), |
||
| 28 | 'file' => $exception->getFile(), |
||
| 29 | 'line' => $exception->getLine(), |
||
| 30 | ]); |
||
| 31 | |||
| 32 | $errors = new ViewErrorBag(); |
||
| 33 | $errors->put('exception', $error); |
||
| 34 | |||
| 35 | return view('backend.partials.exception', compact('errors'))->render(); |
||
|
|
|||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Flash a error message to content. |
||
| 40 | * |
||
| 41 | * @param string $title |
||
| 42 | * @param string $message |
||
| 43 | * |
||
| 44 | * @return mixed |
||
| 45 | */ |
||
| 46 | public static function error($title = '', $message = '') |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
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.