@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if (php_sapi_name() != 'cli') { |
66 | 66 | echo sprintf(self::$style['called_from_format'], Debugger::getCalledFrom(2)); |
67 | 67 | echo sprintf(self::$style['output_format'], $data); |
68 | - echo '<style type="text/css">.xicrow-php-debug-timer:hover{ ' . self::$style['hover_style'] . ' }</style>'; |
|
68 | + echo '<style type="text/css">.xicrow-php-debug-timer:hover{ '.self::$style['hover_style'].' }</style>'; |
|
69 | 69 | } else { |
70 | 70 | echo Debugger::getCalledFrom(2); |
71 | 71 | echo "\n"; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | // Set correct key for the original item |
109 | 109 | if (strpos($item['key'], '#') === false) { |
110 | 110 | self::$collection[$key] = array_merge($item, [ |
111 | - 'key' => $key . ' #1', |
|
111 | + 'key' => $key.' #1', |
|
112 | 112 | 'count' => $itemCount, |
113 | 113 | ]); |
114 | 114 | } else { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | // Set new key |
121 | - $key = $key . ' #' . $itemCount; |
|
121 | + $key = $key.' #'.$itemCount; |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | // Make sure various options are set |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | } |
178 | 178 | |
179 | 179 | // Check for key duplicates, and find the last one not stopped |
180 | - if (isset(self::$collection[$key]) && isset(self::$collection[$key . ' #2'])) { |
|
180 | + if (isset(self::$collection[$key]) && isset(self::$collection[$key.' #2'])) { |
|
181 | 181 | $lastNotStopped = false; |
182 | 182 | $currentKey = $key; |
183 | 183 | $currentIndex = 1; |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | } |
188 | 188 | |
189 | 189 | $currentIndex++; |
190 | - $currentKey = $key . ' #' . $currentIndex; |
|
190 | + $currentKey = $key.' #'.$currentIndex; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | if ($lastNotStopped) { |
@@ -268,21 +268,21 @@ discard block |
||
268 | 268 | if (count($keyArr) > 1) { |
269 | 269 | $method = array_pop($keyArr); |
270 | 270 | $key = implode('/', $keyArr); |
271 | - $key .= '::' . $method; |
|
271 | + $key .= '::'.$method; |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | unset($keyArr, $method); |
275 | 275 | } elseif (is_object($callback) && $callback instanceof \Closure) { |
276 | 276 | $key = 'closure'; |
277 | 277 | } |
278 | - $key = 'callback: ' . $key; |
|
278 | + $key = 'callback: '.$key; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | // Set default return value |
282 | 282 | $returnValue = true; |
283 | 283 | |
284 | 284 | // Set error handler, to convert errors to exceptions |
285 | - set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext) { |
|
285 | + set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) { |
|
286 | 286 | throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); |
287 | 287 | }); |
288 | 288 | |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | ob_end_clean(); |
307 | 307 | |
308 | 308 | // Show error message |
309 | - self::output('Invalid callback sent to Timer::callback: ' . str_replace('callback: ', '', $key)); |
|
309 | + self::output('Invalid callback sent to Timer::callback: '.str_replace('callback: ', '', $key)); |
|
310 | 310 | |
311 | 311 | // Clear the item from the collection |
312 | 312 | unset(self::$collection[$key]); |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | $stats = self::getStats($key, $options); |
362 | 362 | |
363 | 363 | if (php_sapi_name() == 'cli') { |
364 | - $output .= (!empty($output) ? "\n" : '') . $stats; |
|
364 | + $output .= (!empty($output) ? "\n" : '').$stats; |
|
365 | 365 | } else { |
366 | 366 | $output .= '<div class="xicrow-php-debug-timer">'; |
367 | 367 | $output .= $stats; |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | |
398 | 398 | // If item does not exist |
399 | 399 | if (!isset(self::$collection[$key])) { |
400 | - return 'Unknow item in with key: ' . $key; |
|
400 | + return 'Unknow item in with key: '.$key; |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | // Get item |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | $outputName .= ($options['nested'] ? str_repeat($options['nested_prefix'], $item['level']) : ''); |
420 | 420 | $outputName .= $item['key']; |
421 | 421 | if (mb_strlen($outputName) > $options['max_key_length']) { |
422 | - $outputName = '~' . mb_substr($item['key'], -($options['max_key_length'] - 1)); |
|
422 | + $outputName = '~'.mb_substr($item['key'], -($options['max_key_length'] - 1)); |
|
423 | 423 | } |
424 | 424 | |
425 | 425 | // Add item stats |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | krsort(self::$colorThreshold); |
432 | 432 | foreach (self::$colorThreshold as $value => $color) { |
433 | 433 | if (is_numeric($itemResult) && $itemResult >= $value) { |
434 | - $output = '<span style="color: ' . $color . ';">' . $output . '</span>'; |
|
434 | + $output = '<span style="color: '.$color.';">'.$output.'</span>'; |
|
435 | 435 | } |
436 | 436 | } |
437 | 437 | } |
@@ -482,6 +482,6 @@ discard block |
||
482 | 482 | } |
483 | 483 | } |
484 | 484 | |
485 | - return sprintf('%0.' . $precision . 'f', $value) . ' ' . str_pad($unit, 2, ' ', STR_PAD_RIGHT); |
|
485 | + return sprintf('%0.'.$precision.'f', $value).' '.str_pad($unit, 2, ' ', STR_PAD_RIGHT); |
|
486 | 486 | } |
487 | 487 | } |