@@ -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; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | || |
25 | 25 | is_array($variable) |
26 | 26 | || |
27 | - (string)$variable !== $variable |
|
27 | + (string) $variable !== $variable |
|
28 | 28 | || |
29 | 29 | !preg_match('[0\.[0-9]{8} [0-9]{10}]', $variable) |
30 | 30 | ) { |
@@ -33,29 +33,29 @@ discard block |
||
33 | 33 | |
34 | 34 | list($usec, $sec) = explode(" ", $variable); |
35 | 35 | |
36 | - $time = (float)$usec + (float)$sec; |
|
36 | + $time = (float) $usec + (float) $sec; |
|
37 | 37 | $size = memory_get_usage(true); |
38 | 38 | |
39 | 39 | # '@' is used to prevent the dreaded timezone not set error |
40 | 40 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
41 | - $this->value = @date('Y-m-d H:i:s', $sec) . '.' . substr($usec, 2, 4); |
|
41 | + $this->value = @date('Y-m-d H:i:s', $sec).'.'.substr($usec, 2, 4); |
|
42 | 42 | |
43 | 43 | $numberOfCalls = count(self::$_times); |
44 | 44 | if ($numberOfCalls > 0) { # meh, faster than count($times) > 1 |
45 | 45 | $lap = $time - end(self::$_times); |
46 | 46 | self::$_laps[] = $lap; |
47 | 47 | |
48 | - $this->value .= "\n<b>SINCE LAST CALL:</b> <b class=\"kint-microtime\">" . round($lap, 4) . '</b>s.'; |
|
48 | + $this->value .= "\n<b>SINCE LAST CALL:</b> <b class=\"kint-microtime\">".round($lap, 4).'</b>s.'; |
|
49 | 49 | if ($numberOfCalls > 1) { |
50 | - $this->value .= "\n<b>SINCE START:</b> " . round($time - self::$_times[0], 4) . 's.'; |
|
50 | + $this->value .= "\n<b>SINCE START:</b> ".round($time - self::$_times[0], 4).'s.'; |
|
51 | 51 | $this->value .= "\n<b>AVERAGE DURATION:</b> " |
52 | - . round(array_sum(self::$_laps) / $numberOfCalls, 4) . 's.'; |
|
52 | + . round(array_sum(self::$_laps) / $numberOfCalls, 4).'s.'; |
|
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
56 | 56 | $unit = array('B', 'KB', 'MB', 'GB', 'TB'); |
57 | - $memTmp = round($size / pow(1024, $i = (int)floor(log($size, 1024))), 3); |
|
58 | - $this->value .= "\n<b>MEMORY USAGE:</b> " . $size . " bytes (" . $memTmp . ' ' . $unit[$i] . ")"; |
|
57 | + $memTmp = round($size / pow(1024, $i = (int) floor(log($size, 1024))), 3); |
|
58 | + $this->value .= "\n<b>MEMORY USAGE:</b> ".$size." bytes (".$memTmp.' '.$unit[$i].")"; |
|
59 | 59 | |
60 | 60 | self::$_times[] = $time; |
61 | 61 | $this->type = 'Stats'; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | /** @noinspection PhpUndefinedClassInspection */ |
29 | - $this->name = 'object Smarty (v' . substr(Smarty::SMARTY_VERSION, 7) . ')'; # trim 'Smarty-' |
|
29 | + $this->name = 'object Smarty (v'.substr(Smarty::SMARTY_VERSION, 7).')'; # trim 'Smarty-' |
|
30 | 30 | |
31 | 31 | $assigned = $globalAssigns = array(); |
32 | 32 | /** @noinspection PhpUndefinedFieldInspection */ |
@@ -51,7 +51,7 @@ |
||
51 | 51 | |
52 | 52 | $val = $reflection->getFileName(); |
53 | 53 | if ($val) { |
54 | - $this->value = Kint::shortenPath($val) . ':' . $reflection->getStartLine(); |
|
54 | + $this->value = Kint::shortenPath($val).':'.$reflection->getStartLine(); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | return $ret; |
@@ -82,27 +82,27 @@ discard block |
||
82 | 82 | private static function _decorateCell(KintVariableData $kintVar) |
83 | 83 | { |
84 | 84 | if ($kintVar->extendedValue !== null || !empty($kintVar->_alternatives)) { |
85 | - return '<td>' . Kint_Decorators_Rich::decorate($kintVar) . '</td>'; |
|
85 | + return '<td>'.Kint_Decorators_Rich::decorate($kintVar).'</td>'; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | $output = '<td'; |
89 | 89 | |
90 | 90 | if ($kintVar->value !== null) { |
91 | - $output .= ' title="' . $kintVar->type; |
|
91 | + $output .= ' title="'.$kintVar->type; |
|
92 | 92 | |
93 | 93 | if ($kintVar->size !== null) { |
94 | - $output .= " (" . $kintVar->size . ")"; |
|
94 | + $output .= " (".$kintVar->size.")"; |
|
95 | 95 | } |
96 | 96 | |
97 | - $output .= '">' . $kintVar->value; |
|
97 | + $output .= '">'.$kintVar->value; |
|
98 | 98 | } else { |
99 | 99 | $output .= '>'; |
100 | 100 | |
101 | 101 | if ($kintVar->type !== 'NULL') { |
102 | - $output .= '<u>' . $kintVar->type; |
|
102 | + $output .= '<u>'.$kintVar->type; |
|
103 | 103 | |
104 | 104 | if ($kintVar->size !== null) { |
105 | - $output .= "(" . $kintVar->size . ")"; |
|
105 | + $output .= "(".$kintVar->size.")"; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | $output .= '</u>'; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | |
115 | - return $output . '</td>'; |
|
115 | + return $output.'</td>'; |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | */ |
177 | 177 | private static function _parse_array(&$variable, KintVariableData $variableData) |
178 | 178 | { |
179 | - isset(self::$_marker) or self::$_marker = "\x00" . uniqid('kint', true); |
|
179 | + isset(self::$_marker) or self::$_marker = "\x00".uniqid('kint', true); |
|
180 | 180 | |
181 | 181 | # naturally, $GLOBALS variable is an intertwined recursion nightmare, use black magic |
182 | 182 | $globalsDetector = false; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | && |
186 | 186 | is_array($variable['GLOBALS']) |
187 | 187 | ) { |
188 | - $globalsDetector = "\x01" . uniqid('kint', true); |
|
188 | + $globalsDetector = "\x01".uniqid('kint', true); |
|
189 | 189 | |
190 | 190 | $variable['GLOBALS'][$globalsDetector] = true; |
191 | 191 | if (isset($variable[$globalsDetector])) { |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | |
249 | 249 | $extendedValue .= '<tr>'; |
250 | 250 | if ($isSequential) { |
251 | - $output = '<td>' . '#' . ($rowIndex + 1) . '</td>'; |
|
251 | + $output = '<td>'.'#'.($rowIndex + 1).'</td>'; |
|
252 | 252 | } else { |
253 | 253 | $output = self::_decorateCell(KintParser::factory($rowIndex)); |
254 | 254 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | # as we only check the first two to assume |
261 | 261 | foreach ($arrayKeys as $key) { |
262 | 262 | if ($firstRow) { |
263 | - $extendedValue .= '<th>' . self::escape($key) . '</th>'; |
|
263 | + $extendedValue .= '<th>'.self::escape($key).'</th>'; |
|
264 | 264 | } |
265 | 265 | |
266 | 266 | if (!isset($row[$key])) { |
@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | $firstRow = false; |
288 | 288 | } |
289 | 289 | |
290 | - $extendedValue .= $output . '</tr>'; |
|
290 | + $extendedValue .= $output.'</tr>'; |
|
291 | 291 | } |
292 | 292 | unset($row); |
293 | 293 | self::$_placeFullStringInValue = false; |
294 | 294 | |
295 | - $variableData->extendedValue = $extendedValue . '</table>'; |
|
295 | + $variableData->extendedValue = $extendedValue.'</table>'; |
|
296 | 296 | |
297 | 297 | } else { |
298 | 298 | $variable[self::$_marker] = true; |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | if (!$isSequential) { |
312 | 312 | $output->operator = '=>'; |
313 | 313 | } |
314 | - $output->name = $isSequential ? null : "'" . $key . "'"; |
|
314 | + $output->name = $isSequential ? null : "'".$key."'"; |
|
315 | 315 | $extendedValue[] = $output; |
316 | 316 | } |
317 | 317 | unset($val); |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $hash = $match[1]; |
395 | 395 | } |
396 | 396 | |
397 | - $castedArray = (array)$variable; |
|
397 | + $castedArray = (array) $variable; |
|
398 | 398 | $variableData->type = get_class($variable); |
399 | 399 | $variableData->size = count($castedArray); |
400 | 400 | |
@@ -557,12 +557,12 @@ discard block |
||
557 | 557 | |
558 | 558 | $encoding = self::_detectEncoding($variable); |
559 | 559 | if ($encoding) { |
560 | - $variableData->type .= ' [' . $encoding . ']'; |
|
560 | + $variableData->type .= ' ['.$encoding.']'; |
|
561 | 561 | } |
562 | 562 | |
563 | 563 | $variableData->size = UTF8::strlen($variable); |
564 | 564 | if (Kint::enabled() !== Kint::MODE_RICH) { |
565 | - $variableData->value = '"' . self::escape($variable, $encoding) . '"'; |
|
565 | + $variableData->value = '"'.self::escape($variable, $encoding).'"'; |
|
566 | 566 | |
567 | 567 | return; |
568 | 568 | } |
@@ -579,20 +579,20 @@ discard block |
||
579 | 579 | $tmpStrippedString = self::_substr($strippedString, 0, Kint::$maxStrLength, $encoding); |
580 | 580 | |
581 | 581 | // encode and truncate |
582 | - $variableData->value = '"' . self::escape($tmpStrippedString, $encoding) . '…"'; |
|
582 | + $variableData->value = '"'.self::escape($tmpStrippedString, $encoding).'…"'; |
|
583 | 583 | $variableData->extendedValue = self::escape($variable, $encoding); |
584 | 584 | |
585 | 585 | return; |
586 | 586 | } elseif ($variable !== $strippedString) { // omit no data from display |
587 | 587 | |
588 | - $variableData->value = '"' . self::escape($variable, $encoding) . '"'; |
|
588 | + $variableData->value = '"'.self::escape($variable, $encoding).'"'; |
|
589 | 589 | $variableData->extendedValue = self::escape($variable, $encoding); |
590 | 590 | |
591 | 591 | return; |
592 | 592 | } |
593 | 593 | } |
594 | 594 | |
595 | - $variableData->value = '"' . self::escape($variable, $encoding) . '"'; |
|
595 | + $variableData->value = '"'.self::escape($variable, $encoding).'"'; |
|
596 | 596 | } |
597 | 597 | |
598 | 598 | /** @noinspection PhpUnusedPrivateMethodInspection */ |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | private static function _parse_unknown(&$variable, KintVariableData $variableData) |
604 | 604 | { |
605 | 605 | $type = gettype($variable); |
606 | - $variableData->type = "UNKNOWN" . (!empty($type) ? " ({$type})" : ''); |
|
606 | + $variableData->type = "UNKNOWN".(!empty($type) ? " ({$type})" : ''); |
|
607 | 607 | $variableData->value = var_export($variable, true); |
608 | 608 | } |
609 | 609 | |
@@ -688,12 +688,12 @@ discard block |
||
688 | 688 | $varType = 'unknown'; # PHP 5.4 inconsistency |
689 | 689 | } |
690 | 690 | |
691 | - $methodName = '_parse_' . $varType; |
|
691 | + $methodName = '_parse_'.$varType; |
|
692 | 692 | |
693 | 693 | # objects can be presented in a different way altogether, INSTEAD, not ALONGSIDE the generic parser |
694 | 694 | if ($varType === 'object') { |
695 | 695 | foreach (self::$_objectParsers as $parserClass) { |
696 | - $className = 'kint\parsers\objects\Kint_Objects_' . $parserClass; |
|
696 | + $className = 'kint\parsers\objects\Kint_Objects_'.$parserClass; |
|
697 | 697 | |
698 | 698 | /** @var $object KintObject */ |
699 | 699 | $object = new $className(); |
@@ -741,7 +741,7 @@ discard block |
||
741 | 741 | |
742 | 742 | # now check whether the variable can be represented in a different way |
743 | 743 | foreach (self::$_customDataTypes as $parserClass) { |
744 | - $className = 'kint\parsers\custom\Kint_Parsers_' . $parserClass; |
|
744 | + $className = 'kint\parsers\custom\Kint_Parsers_'.$parserClass; |
|
745 | 745 | |
746 | 746 | /** @var $parser KintParser */ |
747 | 747 |
@@ -609,7 +609,7 @@ |
||
609 | 609 | |
610 | 610 | /** |
611 | 611 | * @param mixed $value |
612 | - * @param null|false|string $encoding |
|
612 | + * @param false|string $encoding |
|
613 | 613 | * |
614 | 614 | * @return string|null |
615 | 615 | */ |