@@ -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. |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | case LogLevel::EMERGENCY: |
94 | 94 | if (isset($context['exception']) && $context['exception'] instanceof \Throwable) { |
95 | 95 | $message = $context['exception']; |
96 | - $level = 'Uncaught ' . get_class($context['exception']; |
|
96 | + $level = 'Uncaught '.get_class($context['exception']; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | Debugger::visualDump($message, $level, true); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | break; |
103 | 103 | |
104 | 104 | default: |
105 | - throw new \Psr\Log\InvalidArgumentException('UNDEFINED_LOGLEVEL_' . $level); |
|
105 | + throw new \Psr\Log\InvalidArgumentException('UNDEFINED_LOGLEVEL_'.$level); |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | } |
116 | 116 | |
117 | 117 | if (!isset(self::$level_mapping[$level])) { |
118 | - throw new \Exception(__FUNCTION__ . "($level): $level is unknown"); |
|
118 | + throw new \Exception(__FUNCTION__."($level): $level is unknown"); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | return self::$level_mapping[$level]; |
@@ -156,10 +156,10 @@ discard block |
||
156 | 156 | ); |
157 | 157 | |
158 | 158 | $debug = array_fill_keys( |
159 | - [E_NOTICE, E_USER_NOTICE, E_STRICT,E_DEPRECATED,E_USER_DEPRECATED,E_ALL], |
|
159 | + [E_NOTICE, E_USER_NOTICE, E_STRICT, E_DEPRECATED, E_USER_DEPRECATED, E_ALL], |
|
160 | 160 | LogLevel::DEBUG |
161 | 161 | ); |
162 | 162 | |
163 | - self::$level_mapping = $critical + $error + $debug; |
|
163 | + self::$level_mapping = $critical+$error+$debug; |
|
164 | 164 | } |
165 | 165 | } |