@@ -35,19 +35,19 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public static function registerHttpErrors(Run $debugger, array $config): Run |
| 37 | 37 | { |
| 38 | - return $debugger->pushHandler(static function (Throwable $exception, InspectorInterface $inspector, RunInterface $run) use($config) { |
|
| 38 | + return $debugger->pushHandler(static function(Throwable $exception, InspectorInterface $inspector, RunInterface $run) use($config) { |
|
| 39 | 39 | if (true === $config['log']) { |
| 40 | - if (! in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
| 40 | + if (!in_array($exception->getCode(), $config['ignore_codes'], true)) { |
|
| 41 | 41 | Services::logger()->error($exception); |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | $files = array_map(fn(SplFileInfo $file) => $file->getFilenameWithoutExtension(), Services::fs()->files($config['error_view_path'])); |
| 46 | 46 | |
| 47 | - if (in_array((string)$exception->getCode(), $files, true)) { |
|
| 47 | + if (in_array((string) $exception->getCode(), $files, true)) { |
|
| 48 | 48 | $view = new View(); |
| 49 | 49 | $view->setAdapter(config('view.active_adapter', 'native'), ['view_path_locator' => $config['error_view_path']]) |
| 50 | - ->display((string)$exception->getCode()) |
|
| 50 | + ->display((string) $exception->getCode()) |
|
| 51 | 51 | ->setData(['message' => $exception->getMessage()]) |
| 52 | 52 | ->render(); |
| 53 | 53 | |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if (is_callable($handler)) { |
| 70 | 70 | $debugger->pushHandler($handler); |
| 71 | - } else if(is_string($handler) && class_exists($handler)) { |
|
| 71 | + } else if (is_string($handler) && class_exists($handler)) { |
|
| 72 | 72 | $class = Services::container()->make($handler); |
| 73 | 73 | if (is_callable($class) || $class instanceof HandlerInterface) { |
| 74 | 74 | $debugger->pushHandler($class); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $debugger->pushHandler(new PlainTextHandler()); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - if (! is_online()) { |
|
| 91 | + if (!is_online()) { |
|
| 92 | 92 | if (Misc::isAjaxRequest()) { |
| 93 | 93 | $debugger->pushHandler(new JsonResponseHandler()); |
| 94 | 94 | } else { |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | $debugger = Ignition::make(); |
| 63 | 63 | |
| 64 | 64 | $debugger->applicationPath(ROOTPATH) |
| 65 | - ->shouldDisplayException(! on_prod()) |
|
| 65 | + ->shouldDisplayException(!on_prod()) |
|
| 66 | 66 | ->register(); |
| 67 | 67 | } |
| 68 | 68 | } |