@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * handler for errors |
|
51 | - * use set_error_handler([$instance, 'errorHandler']); |
|
52 | - * |
|
53 | - * https://www.php.net/manual/en/function.set-error-handler |
|
54 | - * |
|
55 | - */ |
|
50 | + * handler for errors |
|
51 | + * use set_error_handler([$instance, 'errorHandler']); |
|
52 | + * |
|
53 | + * https://www.php.net/manual/en/function.set-error-handler |
|
54 | + * |
|
55 | + */ |
|
56 | 56 | public function errorHandler(int $level, string $message, string $file = '', int $line = 0): bool |
57 | 57 | { |
58 | 58 | $loglevel = self::mapErrorLevelToLogLevel($level); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | return self::$level_mapping[$level]; |
122 | 122 | } |
123 | 123 | |
124 | - /** Error level meaning, from \Psr\Log\LogLevel.php |
|
124 | + /** Error level meaning, from \Psr\Log\LogLevel.php |
|
125 | 125 | * |
126 | 126 | * const EMERGENCY = 'emergency'; |
127 | 127 | * // System is unusable. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | ); |
45 | 45 | |
46 | - set_exception_handler(function (\Throwable $throwable) : bool { |
|
46 | + set_exception_handler(function(\Throwable $throwable) : bool { |
|
47 | 47 | return $this->exceptionHandler($throwable); |
48 | 48 | }); |
49 | 49 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | case LogLevel::EMERGENCY: |
105 | 105 | if (isset($context['exception']) && $context['exception'] instanceof \Throwable) { |
106 | 106 | $message = $context['exception']; |
107 | - $level = 'Uncaught ' . get_class($context['exception']); |
|
107 | + $level = 'Uncaught '.get_class($context['exception']); |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | Debugger::visualDump($message, $level, true); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | die; |
113 | 113 | |
114 | 114 | default: |
115 | - throw new \Psr\Log\InvalidArgumentException('UNDEFINED_LOGLEVEL_' . $level); |
|
115 | + throw new \Psr\Log\InvalidArgumentException('UNDEFINED_LOGLEVEL_'.$level); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | ); |
167 | 167 | |
168 | 168 | $debug = array_fill_keys( |
169 | - [E_NOTICE, E_USER_NOTICE, E_STRICT,E_DEPRECATED,E_USER_DEPRECATED,E_ALL], |
|
169 | + [E_NOTICE, E_USER_NOTICE, E_STRICT, E_DEPRECATED, E_USER_DEPRECATED, E_ALL], |
|
170 | 170 | LogLevel::DEBUG |
171 | 171 | ); |
172 | 172 | |
173 | - self::$level_mapping = $critical + $error + $debug; |
|
173 | + self::$level_mapping = $critical+$error+$debug; |
|
174 | 174 | } |
175 | 175 | } |