@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if (is_numeric($k)) { |
122 | 122 | $marker = "\?"; |
123 | 123 | } else { |
124 | - $marker = (preg_match("/^:/", $k)) ? $k : ":" . $k; |
|
124 | + $marker = (preg_match("/^:/", $k)) ? $k : ":".$k; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | $matchRule = "/({$marker}(?!\w))(?=(?:[^$quotationChar]|[$quotationChar][^$quotationChar]*[$quotationChar])*$)/"; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | { |
159 | 159 | $params = []; |
160 | 160 | foreach ($this->parameters as $name => $param) { |
161 | - $params[$name] = htmlentities($param?:"", ENT_QUOTES, 'UTF-8', false); |
|
161 | + $params[$name] = htmlentities($param ?: "", ENT_QUOTES, 'UTF-8', false); |
|
162 | 162 | } |
163 | 163 | return $params; |
164 | 164 | } |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | { |
161 | 161 | $messages = $this->messages; |
162 | 162 | foreach ($this->aggregates as $collector) { |
163 | - $msgs = array_map(function ($m) use ($collector) { |
|
163 | + $msgs = array_map(function($m) use ($collector) { |
|
164 | 164 | $m['collector'] = $collector->getName(); |
165 | 165 | return $m; |
166 | 166 | }, $collector->getMessages()); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | |
170 | 170 | // sort messages by their timestamp |
171 | - usort($messages, function ($a, $b) { |
|
171 | + usort($messages, function($a, $b) { |
|
172 | 172 | if ($a['time'] === $b['time']) { |
173 | 173 | return 0; |
174 | 174 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | foreach ($context as $key => $val) { |
207 | 207 | // check that the value can be cast to string |
208 | 208 | if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) { |
209 | - $replace['{' . $key . '}'] = $val; |
|
209 | + $replace['{'.$key.'}'] = $val; |
|
210 | 210 | } |
211 | 211 | } |
212 | 212 |
@@ -127,7 +127,7 @@ |
||
127 | 127 | { |
128 | 128 | if (is_string($this->sort)) { |
129 | 129 | $p = $this->sort; |
130 | - usort($data, function ($a, $b) use ($p) { |
|
130 | + usort($data, function($a, $b) use ($p) { |
|
131 | 131 | if ($a[$p] == $b[$p]) { |
132 | 132 | return 0; |
133 | 133 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | $this->dumper->dump( |
40 | 40 | $this->cloner->cloneVar($data), |
41 | - function ($line, $depth) use (&$output) { |
|
41 | + function($line, $depth) use (&$output) { |
|
42 | 42 | // A negative depth means "end of dump" |
43 | 43 | if ($depth >= 0) { |
44 | 44 | // Adds a two spaces indentation to the line |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | public function formatDuration($seconds) |
58 | 58 | { |
59 | 59 | if ($seconds < 0.001) { |
60 | - return round($seconds * 1000000) . 'μs'; |
|
60 | + return round($seconds * 1000000).'μs'; |
|
61 | 61 | } elseif ($seconds < 0.1) { |
62 | - return round($seconds * 1000, 2) . 'ms'; |
|
62 | + return round($seconds * 1000, 2).'ms'; |
|
63 | 63 | } elseif ($seconds < 1) { |
64 | - return round($seconds * 1000) . 'ms'; |
|
64 | + return round($seconds * 1000).'ms'; |
|
65 | 65 | } |
66 | - return round($seconds, 2) . 's'; |
|
66 | + return round($seconds, 2).'s'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -82,6 +82,6 @@ discard block |
||
82 | 82 | |
83 | 83 | $base = log($size) / log(1024); |
84 | 84 | $suffixes = array('B', 'KB', 'MB', 'GB', 'TB'); |
85 | - return $sign . round(pow(1024, $base - floor($base)), $precision) . $suffixes[(int) floor($base)]; |
|
85 | + return $sign.round(pow(1024, $base - floor($base)), $precision).$suffixes[(int) floor($base)]; |
|
86 | 86 | } |
87 | 87 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function __construct($dirname) |
24 | 24 | { |
25 | - $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; |
|
25 | + $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | //Sort the files, newest first |
64 | - usort($files, function ($a, $b) { |
|
64 | + usort($files, function($a, $b) { |
|
65 | 65 | return $a['time'] <=> $b['time']; |
66 | 66 | }); |
67 | 67 | |
@@ -123,6 +123,6 @@ discard block |
||
123 | 123 | */ |
124 | 124 | public function makeFilename($id) |
125 | 125 | { |
126 | - return $this->dirname . basename($id). ".json"; |
|
126 | + return $this->dirname.basename($id).".json"; |
|
127 | 127 | } |
128 | 128 | } |
@@ -87,7 +87,7 @@ |
||
87 | 87 | $params[] = $value; |
88 | 88 | } |
89 | 89 | if (count($where)) { |
90 | - $where = " WHERE " . implode(' AND ', $where); |
|
90 | + $where = " WHERE ".implode(' AND ', $where); |
|
91 | 91 | } else { |
92 | 92 | $where = ''; |
93 | 93 | } |
@@ -73,9 +73,9 @@ |
||
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
76 | - } while($cursor); |
|
76 | + } while ($cursor); |
|
77 | 77 | |
78 | - usort($results, static function ($a, $b) { |
|
78 | + usort($results, static function($a, $b) { |
|
79 | 79 | return $b['utime'] <=> $a['utime']; |
80 | 80 | }); |
81 | 81 |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | -spl_autoload_register(function ($class_name) { |
|
2 | +spl_autoload_register(function($class_name) { |
|
3 | 3 | $preg_match = preg_match('/^Psr\\\SimpleCache/', $class_name); |
4 | 4 | |
5 | 5 | if (1 === $preg_match) { |
6 | 6 | $class_name = preg_replace('/\\\/', '/', $class_name); |
7 | 7 | $class_name = preg_replace('/^Psr\\/SimpleCache\\//', '', $class_name); |
8 | - require_once(__DIR__ . '/simple-cache/src/' . $class_name . '.php'); |
|
8 | + require_once(__DIR__.'/simple-cache/src/'.$class_name.'.php'); |
|
9 | 9 | } |
10 | 10 | }); |
11 | 11 | \ No newline at end of file |
@@ -179,6 +179,6 @@ |
||
179 | 179 | { |
180 | 180 | $binary = str_pad(decbin($decimal), 32, '0', STR_PAD_LEFT); |
181 | 181 | |
182 | - return bindec(substr($binary, $bits) . substr($binary, 0, $bits)); |
|
182 | + return bindec(substr($binary, $bits).substr($binary, 0, $bits)); |
|
183 | 183 | } |
184 | 184 | } |