Test Setup Failed
Push — master ( 0d8b13...6e50e5 )
by Jan
04:44
created
src/Timer.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -435,7 +435,7 @@
 block discarded – undo
435 435
     }
436 436
 
437 437
     /**
438
-     * @param int|float   $number
438
+     * @param integer   $number
439 439
      * @param int         $precision
440 440
      * @param null|string $forceUnit
441 441
      *
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             // Set correct key for the original item
104 104
             if (strpos($item['key'], '#') === false) {
105 105
                 self::$collection[$key] = array_merge($item, [
106
-                    'key'   => $key . ' #1',
106
+                    'key'   => $key.' #1',
107 107
                     'count' => $itemCount,
108 108
                 ]);
109 109
             } else {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             }
114 114
 
115 115
             // Set new key
116
-            $key = $key . ' #' . $itemCount;
116
+            $key = $key.' #'.$itemCount;
117 117
         }
118 118
 
119 119
         // Make sure various options are set
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         }
173 173
 
174 174
         // Check for key duplicates, and find the last one not stopped
175
-        if (isset(self::$collection[$key]) && isset(self::$collection[$key . ' #2'])) {
175
+        if (isset(self::$collection[$key]) && isset(self::$collection[$key.' #2'])) {
176 176
             $lastNotStopped = false;
177 177
             $currentKey     = $key;
178 178
             $currentIndex   = 1;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                 }
183 183
 
184 184
                 $currentIndex++;
185
-                $currentKey = $key . ' #' . $currentIndex;
185
+                $currentKey = $key.' #'.$currentIndex;
186 186
             }
187 187
 
188 188
             if ($lastNotStopped) {
@@ -263,21 +263,21 @@  discard block
 block discarded – undo
263 263
                 if (count($keyArr) > 1) {
264 264
                     $method = array_pop($keyArr);
265 265
                     $key    = implode('/', $keyArr);
266
-                    $key    .= '::' . $method;
266
+                    $key .= '::'.$method;
267 267
                 }
268 268
 
269 269
                 unset($keyArr, $method);
270 270
             } elseif (is_object($callback) && $callback instanceof \Closure) {
271 271
                 $key = 'closure';
272 272
             }
273
-            $key = 'callback: ' . $key;
273
+            $key = 'callback: '.$key;
274 274
         }
275 275
 
276 276
         // Set default return value
277 277
         $returnValue = true;
278 278
 
279 279
         // Set error handler, to convert errors to exceptions
280
-        set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext) {
280
+        set_error_handler(function($errno, $errstr, $errfile, $errline, array $errcontext) {
281 281
             throw new \ErrorException($errstr, 0, $errno, $errfile, $errline);
282 282
         });
283 283
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             ob_end_clean();
302 302
 
303 303
             // Show error message
304
-            self::output('Invalid callback sent to Timer::callback: ' . str_replace('callback: ', '', $key));
304
+            self::output('Invalid callback sent to Timer::callback: '.str_replace('callback: ', '', $key));
305 305
 
306 306
             // Clear the item from the collection
307 307
             unset(self::$collection[$key]);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $stats = self::getStats($key, $options);
357 357
 
358 358
             if (php_sapi_name() == 'cli') {
359
-                $output .= (!empty($output) ? "\n" : '') . $stats;
359
+                $output .= (!empty($output) ? "\n" : '').$stats;
360 360
             } else {
361 361
                 $output .= '<div class="xicrow-php-debug-timer">';
362 362
                 $output .= $stats;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 
393 393
         // If item does not exist
394 394
         if (!isset(self::$collection[$key])) {
395
-            return 'Unknow item in with key: ' . $key;
395
+            return 'Unknow item in with key: '.$key;
396 396
         }
397 397
 
398 398
         // Get item
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
         $outputName .= ($options['nested'] ? str_repeat($options['nested_prefix'], $item['level']) : '');
415 415
         $outputName .= $item['key'];
416 416
         if (mb_strlen($outputName) > $options['max_key_length']) {
417
-            $outputName = '~' . mb_substr($item['key'], -($options['max_key_length'] - 1));
417
+            $outputName = '~'.mb_substr($item['key'], -($options['max_key_length'] - 1));
418 418
         }
419 419
 
420 420
         // Add item stats
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             krsort(self::$colorThreshold);
427 427
             foreach (self::$colorThreshold as $value => $color) {
428 428
                 if (is_numeric($itemResult) && $itemResult >= $value) {
429
-                    $output = '<span style="color: ' . $color . ';">' . $output . '</span>';
429
+                    $output = '<span style="color: '.$color.';">'.$output.'</span>';
430 430
                 }
431 431
             }
432 432
         }
@@ -477,6 +477,6 @@  discard block
 block discarded – undo
477 477
             }
478 478
         }
479 479
 
480
-        return sprintf('%0.' . $precision . 'f', $value) . ' ' . str_pad($unit, 2, ' ', STR_PAD_RIGHT);
480
+        return sprintf('%0.'.$precision.'f', $value).' '.str_pad($unit, 2, ' ', STR_PAD_RIGHT);
481 481
     }
482 482
 }
Please login to merge, or discard this patch.
src/Debugger.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         $output     = '';
111 111
         $traceIndex = ($options['reverse'] ? 1 : count($backtrace));
112 112
         foreach ($backtrace as $trace) {
113
-            $output .= $traceIndex . ': ';
113
+            $output .= $traceIndex.': ';
114 114
             $output .= self::getCalledFromTrace($trace);
115 115
             $output .= "\n";
116 116
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         $backtrace = debug_backtrace();
131 131
 
132 132
         if (!isset($backtrace[$index])) {
133
-            return 'Unknown trace with index: ' . $index;
133
+            return 'Unknown trace with index: '.$index;
134 134
         }
135 135
 
136 136
         return self::getCalledFromTrace($backtrace[$index]);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $traceDescription = '';
147 147
         if (empty($traceDescription) && isset($trace['file'])) {
148
-            $traceDescription .= $trace['file'] . ' line ' . $trace['line'];
148
+            $traceDescription .= $trace['file'].' line '.$trace['line'];
149 149
             $traceDescription = str_replace('\\', '/', $traceDescription);
150 150
             $traceDescription = (!empty(self::$documentRoot) ? substr($traceDescription, strlen(self::$documentRoot)) : $traceDescription);
151 151
             $traceDescription = trim($traceDescription, '/');
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
         if (empty($traceDescription) && isset($trace['function'])) {
154 154
             $traceDescription .= (isset($trace['class']) ? $trace['class'] : '');
155 155
             $traceDescription .= (isset($trace['type']) ? $trace['type'] : '');
156
-            $traceDescription .= $trace['function'] . '()';
156
+            $traceDescription .= $trace['function'].'()';
157 157
         }
158 158
         if (empty($traceDescription)) {
159 159
             $traceDescription = 'Unable to get called from trace';
Please login to merge, or discard this patch.