@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | foreach ($vars as $var) { |
55 | 55 | if (isset($GLOBALS[$var])) { |
56 | - $key = "$" . $var; |
|
56 | + $key = "$".$var; |
|
57 | 57 | if ($this->isHtmlVarDumperUsed()) { |
58 | 58 | $data[$key] = $this->getVarDumper()->renderVar($GLOBALS[$var]); |
59 | 59 | } else { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | */ |
249 | 249 | public function getAccumulatedStatementsDuration() : float |
250 | 250 | { |
251 | - return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getDuration(); }); |
|
251 | + return array_reduce($this->executedStatements, function($v, $s) { return $v + $s->getDuration(); }); |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function getMemoryUsage() : int |
260 | 260 | { |
261 | - return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getMemoryUsage(); }); |
|
261 | + return array_reduce($this->executedStatements, function($v, $s) { return $v + $s->getMemoryUsage(); }); |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | */ |
269 | 269 | public function getPeakMemoryUsage() : int |
270 | 270 | { |
271 | - return array_reduce($this->executedStatements, function ($v, $s) { $m = $s->getEndMemory(); return $m > $v ? $m : $v; }); |
|
271 | + return array_reduce($this->executedStatements, function($v, $s) { $m = $s->getEndMemory(); return $m > $v ? $m : $v; }); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | /** |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | */ |
289 | 289 | public function getFailedExecutedStatements() : array |
290 | 290 | { |
291 | - return array_filter($this->executedStatements, function ($s) { return !$s->isSuccess(); }); |
|
291 | + return array_filter($this->executedStatements, function($s) { return !$s->isSuccess(); }); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $data['memory_usage'] += $pdodata['memory_usage']; |
109 | 109 | $data['peak_memory_usage'] = max($data['peak_memory_usage'], $pdodata['peak_memory_usage']); |
110 | 110 | $data['statements'] = array_merge($data['statements'], |
111 | - array_map(function ($s) use ($name) { $s['connection'] = $name; return $s; }, $pdodata['statements'])); |
|
111 | + array_map(function($s) use ($name) { $s['connection'] = $name; return $s; }, $pdodata['statements'])); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | $data['accumulated_duration_str'] = $this->getDataFormatter()->formatDuration($data['accumulated_duration']); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | if (empty($connectionName) || $connectionName == 'default') { |
132 | 132 | $connectionName = 'pdo'; |
133 | 133 | } else { |
134 | - $connectionName = 'pdo ' . $connectionName; |
|
134 | + $connectionName = 'pdo '.$connectionName; |
|
135 | 135 | } |
136 | 136 | $stmts = array(); |
137 | 137 | foreach ($pdo->getExecutedStatements() as $stmt) { |
@@ -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 | } |