@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | * @param int $lineNumber the line to display |
456 | 456 | * @param int $padding surrounding lines to show besides the main one |
457 | 457 | * |
458 | - * @return bool|string |
|
458 | + * @return false|string |
|
459 | 459 | */ |
460 | 460 | private static function _showSource($file, $lineNumber, $padding = 7) |
461 | 461 | { |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | * |
519 | 519 | * @param $step |
520 | 520 | * |
521 | - * @return array |
|
521 | + * @return boolean |
|
522 | 522 | */ |
523 | 523 | private static function _stepIsInternal($step) |
524 | 524 | { |
@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | * |
569 | 569 | * @param mixed $data |
570 | 570 | * |
571 | - * @return void|string |
|
571 | + * @return string |
|
572 | 572 | */ |
573 | 573 | public static function dump($data = null) |
574 | 574 | { |
@@ -780,7 +780,7 @@ discard block |
||
780 | 780 | * @param string $file |
781 | 781 | * @param int $line |
782 | 782 | * |
783 | - * @return mixed |
|
783 | + * @return string |
|
784 | 784 | */ |
785 | 785 | public static function getIdeLink($file, $line) |
786 | 786 | { |
@@ -838,7 +838,7 @@ discard block |
||
838 | 838 | * |
839 | 839 | * @param array $trace [OPTIONAL] you can pass your own trace, otherwise, `debug_backtrace` will be called |
840 | 840 | * |
841 | - * @return mixed |
|
841 | + * @return string |
|
842 | 842 | */ |
843 | 843 | public static function trace($trace = null) |
844 | 844 | { |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | $codePattern = $callee['function']; |
123 | 123 | } else { |
124 | 124 | if ($callee['type'] === '::') { |
125 | - $codePattern = $callee['class'] . "\x07*" . $callee['type'] . "\x07*" . $callee['function']; |
|
125 | + $codePattern = $callee['class']."\x07*".$callee['type']."\x07*".$callee['function']; |
|
126 | 126 | } else { |
127 | - $codePattern = ".*\x07*" . $callee['type'] . "\x07*" . $callee['function']; |
|
127 | + $codePattern = ".*\x07*".$callee['type']."\x07*".$callee['function']; |
|
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | break; |
316 | 316 | } |
317 | 317 | |
318 | - $step['index'] = count( $data ) - 1; |
|
318 | + $step['index'] = count($data) - 1; |
|
319 | 319 | |
320 | 320 | if ($step['function'] !== 'spl_autoload_call') { # meaningless |
321 | 321 | array_unshift($trace, $step); |
@@ -381,14 +381,14 @@ discard block |
||
381 | 381 | $args[$params[$i]->name] = $arg; |
382 | 382 | } else { |
383 | 383 | # assign the argument by number |
384 | - $args['#' . ($i + 1)] = $arg; |
|
384 | + $args['#'.($i + 1)] = $arg; |
|
385 | 385 | } |
386 | 386 | } |
387 | 387 | } |
388 | 388 | |
389 | 389 | if (isset($step['class'])) { |
390 | 390 | # Class->method() or Class::method() |
391 | - $function = $step['class'] . $step['type'] . $function; |
|
391 | + $function = $step['class'].$step['type'].$function; |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | // TODO: it's possible to parse the object name out from the source! |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | 'line' => isset($line) ? $line : null, |
400 | 400 | 'source' => isset($source) ? $source : null, |
401 | 401 | 'object' => isset($step['object']) ? $step['object'] : null, |
402 | - 'index' => isset( $step['index'] ) ? $step['index'] - count( $data ) : null, |
|
402 | + 'index' => isset($step['index']) ? $step['index'] - count($data) : null, |
|
403 | 403 | ); |
404 | 404 | |
405 | 405 | unset($function, $args, $file, $line, $source); |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | ); |
484 | 484 | |
485 | 485 | # set the zero-padding amount for line numbers |
486 | - $format = '% ' . strlen($range['end']) . 'd'; |
|
486 | + $format = '% '.strlen($range['end']).'d'; |
|
487 | 487 | |
488 | 488 | $source = ''; |
489 | 489 | while (($row = fgets($filePointer)) !== false) { |
@@ -497,13 +497,13 @@ discard block |
||
497 | 497 | $row = htmlspecialchars($row, ENT_NOQUOTES, 'UTF-8'); |
498 | 498 | |
499 | 499 | # trim whitespace and sanitize the row |
500 | - $row = '<span>' . sprintf($format, $line) . '</span> ' . $row; |
|
500 | + $row = '<span>'.sprintf($format, $line).'</span> '.$row; |
|
501 | 501 | |
502 | 502 | if ($line === $lineNumber) { |
503 | 503 | # apply highlighting to this row |
504 | - $row = '<div class="kint-highlight">' . $row . '</div>'; |
|
504 | + $row = '<div class="kint-highlight">'.$row.'</div>'; |
|
505 | 505 | } else { |
506 | - $row = '<div>' . $row . '</div>'; |
|
506 | + $row = '<div>'.$row.'</div>'; |
|
507 | 507 | } |
508 | 508 | |
509 | 509 | # add to the captured source |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | $path = str_replace('\\', '/', $path); |
818 | 818 | |
819 | 819 | if (strpos($file, $path) === 0) { |
820 | - $shortenedName = $replaceString . substr($file, strlen($path)); |
|
820 | + $shortenedName = $replaceString.substr($file, strlen($path)); |
|
821 | 821 | $replaced = true; |
822 | 822 | break; |
823 | 823 | } |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | } |
836 | 836 | } |
837 | 837 | |
838 | - $shortenedName = ($i ? '.../' : '') . implode('/', array_slice($fileParts, $i)); |
|
838 | + $shortenedName = ($i ? '.../' : '').implode('/', array_slice($fileParts, $i)); |
|
839 | 839 | } |
840 | 840 | |
841 | 841 | return $shortenedName; |
@@ -18,9 +18,9 @@ |
||
18 | 18 | return; |
19 | 19 | } |
20 | 20 | |
21 | - define('KINT_DIR', __DIR__ . '/'); |
|
21 | + define('KINT_DIR', __DIR__.'/'); |
|
22 | 22 | |
23 | - require KINT_DIR . 'config.default.php'; |
|
23 | + require KINT_DIR.'config.default.php'; |
|
24 | 24 | |
25 | 25 | # init settings |
26 | 26 | if (!empty($GLOBALS['_kint_settings'])) { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | if ( |
21 | 21 | is_object($variable) |
22 | 22 | || is_array($variable) |
23 | - || (string)$variable !== $variable |
|
23 | + || (string) $variable !== $variable |
|
24 | 24 | || strlen($variable) > 2048 |
25 | 25 | || preg_match('[[:?<>"*|]]', $variable) |
26 | 26 | || !@is_readable($variable) # f@#! PHP and its random warnings |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | if ( |
20 | 20 | is_object($variable) |
21 | 21 | || is_array($variable) |
22 | - || (string)$variable !== $variable |
|
22 | + || (string) $variable !== $variable |
|
23 | 23 | || !isset($variable[0]) |
24 | 24 | || ($variable[0] !== '{' && $variable[0] !== '[') |
25 | 25 | || ($json = json_decode($variable, true)) === null |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | return false; |
28 | 28 | } |
29 | 29 | |
30 | - $val = (array)$json; |
|
30 | + $val = (array) $json; |
|
31 | 31 | if (empty($val)) { |
32 | 32 | return false; |
33 | 33 | } |
@@ -22,15 +22,15 @@ discard block |
||
22 | 22 | is_array($variable) |
23 | 23 | || |
24 | 24 | ( |
25 | - (string)$variable !== $variable |
|
25 | + (string) $variable !== $variable |
|
26 | 26 | && |
27 | - (int)$variable !== $variable |
|
27 | + (int) $variable !== $variable |
|
28 | 28 | ) |
29 | 29 | ) { |
30 | 30 | return false; |
31 | 31 | } |
32 | 32 | |
33 | - $len = strlen((int)$variable); |
|
33 | + $len = strlen((int) $variable); |
|
34 | 34 | |
35 | 35 | return |
36 | 36 | ( |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | ) # also handles javascript micro timestamps |
46 | 46 | ) |
47 | 47 | && |
48 | - (string)(int)$variable == $variable; |
|
48 | + (string) (int) $variable == $variable; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | try { |
20 | 20 | if ( |
21 | - (string)$variable === $variable |
|
21 | + (string) $variable === $variable |
|
22 | 22 | && |
23 | 23 | 0 === strpos($variable, '<?xml') |
24 | 24 | ) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | $_ = $property->getValue(); |
42 | - $output = KintParser::factory($_, '$' . $property->getName()); |
|
42 | + $output = KintParser::factory($_, '$'.$property->getName()); |
|
43 | 43 | |
44 | 44 | $output->access = $access; |
45 | 45 | $output->operator = '::'; |
@@ -388,9 +388,9 @@ |
||
388 | 388 | // TODO: make this readable ... |
389 | 389 | return isset(self::$_css3Named[$var]) |
390 | 390 | || preg_match( |
391 | - '/^(?:#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{6}|(?:rgb|hsl)a?\s*\((?:\s*[0-9.%]+\s*,?){3,4}\))$/', |
|
392 | - $var |
|
393 | - ); |
|
391 | + '/^(?:#[0-9A-Fa-f]{3}|#[0-9A-Fa-f]{6}|(?:rgb|hsl)a?\s*\((?:\s*[0-9.%]+\s*,?){3,4}\))$/', |
|
392 | + $var |
|
393 | + ); |
|
394 | 394 | } |
395 | 395 | |
396 | 396 | /** |
@@ -227,8 +227,8 @@ discard block |
||
227 | 227 | |
228 | 228 | return array( |
229 | 229 | round($H * 360), |
230 | - round($S * 100) . '%', |
|
231 | - round($L * 100) . '%', |
|
230 | + round($S * 100).'%', |
|
231 | + round($L * 100).'%', |
|
232 | 232 | ); |
233 | 233 | } |
234 | 234 | |
@@ -263,9 +263,9 @@ discard block |
||
263 | 263 | $colors = str_split($color, 2); |
264 | 264 | } else { |
265 | 265 | $colors = array( |
266 | - $color[0] . $color[0], |
|
267 | - $color[1] . $color[1], |
|
268 | - $color[2] . $color[2], |
|
266 | + $color[0].$color[0], |
|
267 | + $color[1].$color[1], |
|
268 | + $color[2].$color[2], |
|
269 | 269 | ); |
270 | 270 | } |
271 | 271 | |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | } else { |
335 | 335 | $a = ''; |
336 | 336 | } |
337 | - $variant = "rgb{$a}( " . implode(', ', $rgb) . ' )'; |
|
337 | + $variant = "rgb{$a}( ".implode(', ', $rgb).' )'; |
|
338 | 338 | break; |
339 | 339 | case 'hsl': |
340 | 340 | $rgb = self::_RGBtoHSL($decimalColors); |
@@ -349,7 +349,7 @@ discard block |
||
349 | 349 | $a = ''; |
350 | 350 | } |
351 | 351 | |
352 | - $variant = "hsl{$a}( " . implode(', ', $rgb) . ' )'; |
|
352 | + $variant = "hsl{$a}( ".implode(', ', $rgb).' )'; |
|
353 | 353 | break; |
354 | 354 | case 'name': |
355 | 355 | // [!] name in initial variants array must go after hex |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | || |
379 | 379 | is_array($variable) |
380 | 380 | || |
381 | - (string)$variable === $variable |
|
381 | + (string) $variable === $variable |
|
382 | 382 | ) { |
383 | 383 | return false; |
384 | 384 | } |
@@ -52,26 +52,26 @@ discard block |
||
52 | 52 | try { |
53 | 53 | $paramClassName = $param->getClass(); |
54 | 54 | if ($paramClassName) { |
55 | - $paramString .= $paramClassName->name . ' '; |
|
55 | + $paramString .= $paramClassName->name.' '; |
|
56 | 56 | } |
57 | 57 | } catch (\ReflectionException $e) { |
58 | - preg_match('/\[\s\<\w+?>\s([\w]+)/', (string)$param, $matches); |
|
58 | + preg_match('/\[\s\<\w+?>\s([\w]+)/', (string) $param, $matches); |
|
59 | 59 | $paramClassName = isset($matches[1]) ? $matches[1] : ''; |
60 | 60 | |
61 | - $paramString .= ' UNDEFINED CLASS (' . $paramClassName . ') '; |
|
61 | + $paramString .= ' UNDEFINED CLASS ('.$paramClassName.') '; |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | - $paramString .= ($param->isPassedByReference() ? '&' : '') . '$' . $param->getName(); |
|
65 | + $paramString .= ($param->isPassedByReference() ? '&' : '').'$'.$param->getName(); |
|
66 | 66 | |
67 | 67 | if ($param->isDefaultValueAvailable()) { |
68 | 68 | if (is_array($param->getDefaultValue())) { |
69 | 69 | $arrayValues = array(); |
70 | 70 | foreach ($param->getDefaultValue() as $key => $value) { |
71 | - $arrayValues[] = $key . ' => ' . $value; |
|
71 | + $arrayValues[] = $key.' => '.$value; |
|
72 | 72 | } |
73 | 73 | |
74 | - $defaultValue = 'array(' . implode(', ', $arrayValues) . ')'; |
|
74 | + $defaultValue = 'array('.implode(', ', $arrayValues).')'; |
|
75 | 75 | } elseif ($param->getDefaultValue() === null) { |
76 | 76 | $defaultValue = 'NULL'; |
77 | 77 | } elseif ($param->getDefaultValue() === false) { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | $defaultValue = $param->getDefaultValue(); |
85 | 85 | } |
86 | 86 | |
87 | - $paramString .= ' = ' . $defaultValue; |
|
87 | + $paramString .= ' = '.$defaultValue; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | $params[] = $paramString; |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | - $output->name = ($method->returnsReference() ? '&' : '') . $method->getName() . '(' |
|
111 | - . implode(', ', $params) . ')'; |
|
110 | + $output->name = ($method->returnsReference() ? '&' : '').$method->getName().'(' |
|
111 | + . implode(', ', $params).')'; |
|
112 | 112 | $output->access = $access; |
113 | 113 | |
114 | 114 | if (is_string($docBlock)) { |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $lines[] = self::escape(trim($line), 'UTF-8'); |
126 | 126 | } |
127 | 127 | |
128 | - $output->extendedValue = implode("\n", $lines) . "\n\n"; |
|
128 | + $output->extendedValue = implode("\n", $lines)."\n\n"; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | $declaringClass = $method->getDeclaringClass(); |
@@ -136,11 +136,11 @@ discard block |
||
136 | 136 | $output->extendedValue .= "<small>Inherited from <i>{$declaringClassName}</i></small>\n"; |
137 | 137 | } |
138 | 138 | |
139 | - $fileName = Kint::shortenPath($method->getFileName()) . ':' . $method->getStartLine(); |
|
139 | + $fileName = Kint::shortenPath($method->getFileName()).':'.$method->getStartLine(); |
|
140 | 140 | /** @noinspection PhpToStringImplementationInspection */ |
141 | 141 | $output->extendedValue .= "<small>Defined in {$fileName}</small>"; |
142 | 142 | |
143 | - $sortName = $access . $method->getName(); |
|
143 | + $sortName = $access.$method->getName(); |
|
144 | 144 | |
145 | 145 | if ($method->isPrivate()) { |
146 | 146 | $private[$sortName] = $output; |