@@ -4,13 +4,13 @@ discard block |
||
| 4 | 4 | { |
| 5 | 5 | class Debugger |
| 6 | 6 | { |
| 7 | - private static $meta_methods=[]; |
|
| 7 | + private static $meta_methods = []; |
|
| 8 | 8 | |
| 9 | 9 | public function __construct() |
| 10 | 10 | { |
| 11 | 11 | $debugger = new \ReflectionClass(__CLASS__); |
| 12 | 12 | $methods = $debugger->getMethods(); |
| 13 | - self::$meta_methods = array_map(function($m){return $m->name;}, $methods); |
|
| 13 | + self::$meta_methods = array_map(function($m) {return $m->name; }, $methods); |
|
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public static function displayErrors($error_message = null) |
@@ -67,8 +67,8 @@ discard block |
||
| 67 | 67 | // -- formatting : first line of \Throwable-based error |
| 68 | 68 | public static function formatThrowable(\Throwable $err) |
| 69 | 69 | { |
| 70 | - return PHP_EOL . sprintf( |
|
| 71 | - '%s (%d) in file %s:%d' . PHP_EOL . '%s', |
|
| 70 | + return PHP_EOL.sprintf( |
|
| 71 | + '%s (%d) in file %s:%d'.PHP_EOL.'%s', |
|
| 72 | 72 | get_class($err), |
| 73 | 73 | $err->getCode(), |
| 74 | 74 | self::formatFilename($err->getFile()), |
@@ -129,13 +129,13 @@ discard block |
||
| 129 | 129 | if (is_null($arg)) { |
| 130 | 130 | $ret[] = 'NULL'; |
| 131 | 131 | } elseif (is_bool($arg)) { |
| 132 | - $ret[] = 'bool:' . ((int)$arg); |
|
| 132 | + $ret[] = 'bool:'.((int) $arg); |
|
| 133 | 133 | } elseif (is_scalar($arg)) { |
| 134 | 134 | $ret[] = $arg; |
| 135 | 135 | } elseif (is_object($arg)) { |
| 136 | 136 | $ret[] = get_class($arg); |
| 137 | 137 | } elseif (is_array($arg)) { |
| 138 | - $ret[] = 'Array #' . count($arg); |
|
| 138 | + $ret[] = 'Array #'.count($arg); |
|
| 139 | 139 | } else { |
| 140 | 140 | $ret[] = 'unknown type'; |
| 141 | 141 | } |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | private static function isShortcutCall($function_name): bool |
| 153 | 153 | { |
| 154 | - return in_array($function_name, ['vd', 'dd','vdt', 'ddt']); |
|
| 154 | + return in_array($function_name, ['vd', 'dd', 'vdt', 'ddt']); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | private static function toHTML($message) |