@@ -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; |
@@ -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 | */ |
@@ -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(self::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 | |
@@ -474,9 +474,9 @@ |
||
| 474 | 474 | |
| 475 | 475 | |
| 476 | 476 | return '<footer>' |
| 477 | - . '<span class="kint-popup-trigger" title="Open in new window">→</span> ' |
|
| 478 | - . "{$calleeInfo}{$callingFunction}{$traceDisplay}" |
|
| 479 | - . '</footer></div>'; |
|
| 477 | + . '<span class="kint-popup-trigger" title="Open in new window">→</span> ' |
|
| 478 | + . "{$calleeInfo}{$callingFunction}{$traceDisplay}" |
|
| 479 | + . '</footer></div>'; |
|
| 480 | 480 | } |
| 481 | 481 | |
| 482 | 482 | /** |
@@ -78,8 +78,8 @@ |
||
| 78 | 78 | * @param KintVariableData $kintVar |
| 79 | 79 | * @param int $level |
| 80 | 80 | * @param string $accessChain |
| 81 | - * @param mixed $parentType |
|
| 82 | - * @param mixed $context |
|
| 81 | + * @param string $parentType |
|
| 82 | + * @param integer $context |
|
| 83 | 83 | * |
| 84 | 84 | * @return string |
| 85 | 85 | * @throws \Exception |
@@ -22,15 +22,15 @@ discard block |
||
| 22 | 22 | $output = ''; |
| 23 | 23 | if ($verbose) { |
| 24 | 24 | if ($kintVar->access !== null) { |
| 25 | - $output .= '<var>' . $kintVar->access . '</var> '; |
|
| 25 | + $output .= '<var>'.$kintVar->access.'</var> '; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | if ($kintVar->name !== null && $kintVar->name !== '') { |
| 29 | - $output .= '<dfn>' . KintParser::escape($kintVar->name) . '</dfn> '; |
|
| 29 | + $output .= '<dfn>'.KintParser::escape($kintVar->name).'</dfn> '; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if ($kintVar->operator !== null) { |
| 33 | - $output .= $kintVar->operator . ' '; |
|
| 33 | + $output .= $kintVar->operator.' '; |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if ($kintVar->size !== null) { |
| 52 | - $output .= '(' . $kintVar->size . ') '; |
|
| 52 | + $output .= '('.$kintVar->size.') '; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | return $output; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $shortenedPath = Kint::shortenPath($file); |
| 67 | 67 | if (!Kint::$fileLinkFormat) { |
| 68 | - return $shortenedPath . ':' . $line; |
|
| 68 | + return $shortenedPath.':'.$line; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $ideLink = Kint::getIdeLink($file, $line); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | if (Kint::$expandedByDefault) { |
| 96 | 96 | $class .= ' kint-show'; |
| 97 | 97 | } |
| 98 | - $output .= '<dt class="' . $class . '">'; |
|
| 98 | + $output .= '<dt class="'.$class.'">'; |
|
| 99 | 99 | } else { |
| 100 | 100 | $output .= '<dt>'; |
| 101 | 101 | } |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | } elseif ($parentType === 'object') { |
| 141 | 141 | |
| 142 | - $accessChain .= '->' . $name; |
|
| 142 | + $accessChain .= '->'.$name; |
|
| 143 | 143 | if (0 === strpos($name, '__construct(')) { |
| 144 | - $accessChain = 'new ' . $context . substr($name, 11); |
|
| 144 | + $accessChain = 'new '.$context.substr($name, 11); |
|
| 145 | 145 | } |
| 146 | 146 | $thisChain = $accessChain; |
| 147 | 147 | |
@@ -154,25 +154,25 @@ discard block |
||
| 154 | 154 | && |
| 155 | 155 | is_int($context) |
| 156 | 156 | ) { |
| 157 | - $name = (string)$context; |
|
| 157 | + $name = (string) $context; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | if (ctype_digit($name)) { |
| 161 | - $accessChain .= '[' . $name . ']'; |
|
| 161 | + $accessChain .= '['.$name.']'; |
|
| 162 | 162 | } else { |
| 163 | - $accessChain .= '[\'' . $name . '\']'; |
|
| 163 | + $accessChain .= '[\''.$name.'\']'; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | $thisChain = $accessChain; |
| 167 | 167 | |
| 168 | 168 | } elseif ($parentType === 'static') { |
| 169 | 169 | |
| 170 | - $accessChain = $context . '::' . $name; |
|
| 170 | + $accessChain = $context.'::'.$name; |
|
| 171 | 171 | $thisChain = $accessChain; |
| 172 | 172 | |
| 173 | 173 | } elseif ($parentType === 'self') { |
| 174 | 174 | |
| 175 | - $accessChain = 'self::' . $name; |
|
| 175 | + $accessChain = 'self::'.$name; |
|
| 176 | 176 | $thisChain = $accessChain; |
| 177 | 177 | |
| 178 | 178 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | $output .= '<span class="kint-popup-trigger" title="Open in new window">→</span><nav></nav>'; |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | - $output .= self::_drawHeader($kintVar) . $kintVar->value . '</dt>'; |
|
| 195 | + $output .= self::_drawHeader($kintVar).$kintVar->value.'</dt>'; |
|
| 196 | 196 | |
| 197 | 197 | if ($extendedPresent) { |
| 198 | 198 | $output .= '<dd>'; |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | } |
| 207 | 207 | } elseif (is_string($kintVar->extendedValue)) { |
| 208 | 208 | /** @noinspection PhpToStringImplementationInspection */ |
| 209 | - $output .= '<pre>' . $kintVar->extendedValue . '</pre>'; |
|
| 209 | + $output .= '<pre>'.$kintVar->extendedValue.'</pre>'; |
|
| 210 | 210 | } else { |
| 211 | 211 | /** @noinspection PhpParamsInspection */ |
| 212 | 212 | $output .= self::decorate($kintVar->extendedValue); // it's kintVariableData |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | |
| 218 | 218 | foreach ($kintVar->_alternatives as $k => $var) { |
| 219 | 219 | $active = $k === 0 ? ' class="kint-active-tab"' : ''; |
| 220 | - $output .= "<li{$active}>" . self::_drawHeader($var, false) . '</li>'; |
|
| 220 | + $output .= "<li{$active}>".self::_drawHeader($var, false).'</li>'; |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | $output .= '</ul><ul>'; |
@@ -254,20 +254,20 @@ discard block |
||
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | $output .= is_string($v) |
| 257 | - ? '<pre>' . $v . '</pre>' |
|
| 257 | + ? '<pre>'.$v.'</pre>' |
|
| 258 | 258 | : self::decorate($v, $level, $accessChain, $p, $c); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | } elseif (is_string($var->value)) { |
| 262 | 262 | |
| 263 | - $output .= '<pre>' . $var->value . '</pre>'; |
|
| 263 | + $output .= '<pre>'.$var->value.'</pre>'; |
|
| 264 | 264 | |
| 265 | 265 | } elseif (isset($var->value)) { |
| 266 | 266 | |
| 267 | 267 | throw new \Exception( |
| 268 | 268 | 'Kint has encountered an error, ' |
| 269 | 269 | . 'please paste this report to https://github.com/raveren/kint/issues<br>' |
| 270 | - . 'Error encountered at ' . basename(__FILE__) . ':' . __LINE__ . '<br>' |
|
| 270 | + . 'Error encountered at '.basename(__FILE__).':'.__LINE__.'<br>' |
|
| 271 | 271 | . ' variables: ' |
| 272 | 272 | . htmlspecialchars(var_export($kintVar->_alternatives, true), ENT_QUOTES) |
| 273 | 273 | ); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | } |
| 285 | 285 | |
| 286 | 286 | if ($thisChain) { |
| 287 | - $output .= '<dt class="access-path">' . $thisChain . '</dt>'; |
|
| 287 | + $output .= '<dt class="access-path">'.$thisChain.'</dt>'; |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | $output .= '</dl>'; |
@@ -309,8 +309,8 @@ discard block |
||
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | $output .= ' |
| 312 | - <dt class="' . $class . '"> |
|
| 313 | - <b>' . ($i + 1) . '</b> |
|
| 312 | + <dt class="' . $class.'"> |
|
| 313 | + <b>' . ($i + 1).'</b> |
|
| 314 | 314 | <nav></nav> |
| 315 | 315 | <var> |
| 316 | 316 | '; |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | $output .= $step['function']; |
| 327 | 327 | |
| 328 | 328 | if (isset($step['args'])) { |
| 329 | - $output .= '(' . implode(', ', array_keys($step['args'])) . ')'; |
|
| 329 | + $output .= '('.implode(', ', array_keys($step['args'])).')'; |
|
| 330 | 330 | } |
| 331 | 331 | |
| 332 | 332 | $output .= '</dt><dd>'; |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | KintParser::reset(); |
| 366 | 366 | |
| 367 | 367 | if (isset($step['index']) && $step['index'] !== null) { |
| 368 | - $output .= self::decorate(KintParser::factory($arg, $k), 0, 'debug_backtrace()[' . $step['index'] . "]['args']", 'array', $j); |
|
| 368 | + $output .= self::decorate(KintParser::factory($arg, $k), 0, 'debug_backtrace()['.$step['index']."]['args']", 'array', $j); |
|
| 369 | 369 | } else { |
| 370 | 370 | $output .= self::decorate(KintParser::factory($arg, $k)); |
| 371 | 371 | } |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $output .= '<li>'; |
| 383 | 383 | |
| 384 | 384 | if (isset($step['index']) && $step['index'] !== null) { |
| 385 | - $output .= self::decorate($calleeDump, 'debug_backtrace(true)[' . $step['index'] . ']', 'array', 'object'); |
|
| 385 | + $output .= self::decorate($calleeDump, 'debug_backtrace(true)['.$step['index'].']', 'array', 'object'); |
|
| 386 | 386 | } else { |
| 387 | 387 | $output .= self::decorate($calleeDump); |
| 388 | 388 | } |
@@ -405,21 +405,21 @@ discard block |
||
| 405 | 405 | */ |
| 406 | 406 | public static function init() |
| 407 | 407 | { |
| 408 | - $baseDir = KINT_DIR . '../../frontend/'; |
|
| 408 | + $baseDir = KINT_DIR.'../../frontend/'; |
|
| 409 | 409 | |
| 410 | - $baseDirJs = $baseDir . 'js-min/'; |
|
| 411 | - $baseDirCss = $baseDir . 'css-min/'; |
|
| 410 | + $baseDirJs = $baseDir.'js-min/'; |
|
| 411 | + $baseDirCss = $baseDir.'css-min/'; |
|
| 412 | 412 | |
| 413 | - $cssFile = $baseDirCss . Kint::$theme . '.css'; |
|
| 413 | + $cssFile = $baseDirCss.Kint::$theme.'.css'; |
|
| 414 | 414 | |
| 415 | 415 | // fallback |
| 416 | 416 | if (!is_readable($cssFile)) { |
| 417 | - $cssFile = $baseDirCss . 'original.css'; |
|
| 417 | + $cssFile = $baseDirCss.'original.css'; |
|
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | return ' |
| 421 | - <script class="-kint-js">' . file_get_contents($baseDirJs . 'kint.pkgd.js') . '</script> |
|
| 422 | - <style class="-kint-css">' . file_get_contents($cssFile) . '</style> |
|
| 421 | + <script class="-kint-js">' . file_get_contents($baseDirJs.'kint.pkgd.js').'</script> |
|
| 422 | + <style class="-kint-css">' . file_get_contents($cssFile).'</style> |
|
| 423 | 423 | '; |
| 424 | 424 | } |
| 425 | 425 | |
@@ -452,19 +452,19 @@ discard block |
||
| 452 | 452 | && |
| 453 | 453 | !in_array($prevCaller['function'], array('include', 'include_once', 'require', 'require_once'), true) |
| 454 | 454 | ) { |
| 455 | - $callingFunction .= $prevCaller['function'] . '()'; |
|
| 455 | + $callingFunction .= $prevCaller['function'].'()'; |
|
| 456 | 456 | } |
| 457 | 457 | $callingFunction and $callingFunction = " [{$callingFunction}]"; |
| 458 | 458 | |
| 459 | 459 | |
| 460 | 460 | if (isset($callee['file'])) { |
| 461 | - $calleeInfo .= 'Called from ' . self::_ideLink($callee['file'], $callee['line']); |
|
| 461 | + $calleeInfo .= 'Called from '.self::_ideLink($callee['file'], $callee['line']); |
|
| 462 | 462 | } |
| 463 | 463 | |
| 464 | 464 | if (!empty($miniTrace)) { |
| 465 | 465 | $traceDisplay = '<ol>'; |
| 466 | 466 | foreach ($miniTrace as $step) { |
| 467 | - $traceDisplay .= '<li>' . self::_ideLink($step['file'], $step['line']); // closing tag not required |
|
| 467 | + $traceDisplay .= '<li>'.self::_ideLink($step['file'], $step['line']); // closing tag not required |
|
| 468 | 468 | if ( |
| 469 | 469 | isset($step['function']) |
| 470 | 470 | && |
@@ -477,13 +477,13 @@ discard block |
||
| 477 | 477 | if (isset($step['type'])) { |
| 478 | 478 | $classString .= $step['type']; |
| 479 | 479 | } |
| 480 | - $classString .= $step['function'] . '()]'; |
|
| 480 | + $classString .= $step['function'].'()]'; |
|
| 481 | 481 | $traceDisplay .= $classString; |
| 482 | 482 | } |
| 483 | 483 | } |
| 484 | 484 | $traceDisplay .= '</ol>'; |
| 485 | 485 | |
| 486 | - $calleeInfo = '<nav></nav>' . $calleeInfo; |
|
| 486 | + $calleeInfo = '<nav></nav>'.$calleeInfo; |
|
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | |
@@ -505,6 +505,6 @@ discard block |
||
| 505 | 505 | $classExtra = ' kint-delayed-mode '; |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - return '<div class="kint ' . $classExtra . '">'; |
|
| 508 | + return '<div class="kint '.$classExtra.'">'; |
|
| 509 | 509 | } |
| 510 | 510 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public static function decorate(KintVariableData $kintVar, /** @noinspection PhpUnusedParameterInspection */ $level = 0) |
| 72 | 72 | { |
| 73 | 73 | return 'kintDump.push(' . json_encode(self::_unparse($kintVar)) . ');' |
| 74 | - . 'console.log(kintDump[kintDump.length-1]);'; |
|
| 74 | + . 'console.log(kintDump[kintDump.length-1]);'; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | return 'kintDump.push(' . json_encode($traceData) . ');' |
| 97 | - . 'console.log(kintDump[kintDump.length-1]);'; |
|
| 97 | + . 'console.log(kintDump[kintDump.length-1]);'; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $key = substr($key, 1, -1); |
| 49 | 49 | } |
| 50 | 50 | if (ctype_digit($key)) { |
| 51 | - $key = (int)$key; |
|
| 51 | + $key = (int) $key; |
|
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | $ret[$key] = self::_unparse($var); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | if (class_exists($kintVar->type)) { |
| 59 | - $ret = (object)$ret; |
|
| 59 | + $ret = (object) $ret; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | return $ret; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public static function decorate(KintVariableData $kintVar, /** @noinspection PhpUnusedParameterInspection */ $level = 0) |
| 72 | 72 | { |
| 73 | - return 'kintDump.push(' . json_encode(self::_unparse($kintVar)) . ');' |
|
| 73 | + return 'kintDump.push('.json_encode(self::_unparse($kintVar)).');' |
|
| 74 | 74 | . 'console.log(kintDump[kintDump.length-1]);'; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - return 'kintDump.push(' . json_encode($traceData) . ');' |
|
| 96 | + return 'kintDump.push('.json_encode($traceData).');' |
|
| 97 | 97 | . 'console.log(kintDump[kintDump.length-1]);'; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -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'; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | $url = Kint::getIdeLink($callee['file'], $callee['line']); |
| 62 | - $shortenedName = Kint::shortenPath($callee['file']) . ':' . $callee['line']; |
|
| 62 | + $shortenedName = Kint::shortenPath($callee['file']).':'.$callee['line']; |
|
| 63 | 63 | |
| 64 | 64 | if (Kint::enabled() === Kint::MODE_PLAIN) { |
| 65 | 65 | if (strpos($url, 'http://') === 0) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | break; |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - return $repeat ? str_repeat($char, $repeat) : (string)$char; |
|
| 101 | + return $repeat ? str_repeat($char, $repeat) : (string) $char; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /** |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | switch (Kint::enabled()) { |
| 116 | 116 | case Kint::MODE_PLAIN: |
| 117 | 117 | if (!self::$_enableColors) { |
| 118 | - return $text . $nlAfterChar; |
|
| 118 | + return $text.$nlAfterChar; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | switch ($type) { |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | break; |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | - return $text . $nlAfterChar; |
|
| 133 | + return $text.$nlAfterChar; |
|
| 134 | 134 | break; |
| 135 | 135 | case Kint::MODE_CLI: |
| 136 | 136 | if (!self::$_enableColors) { |
| 137 | - return $text . $nlAfterChar; |
|
| 137 | + return $text.$nlAfterChar; |
|
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | $optionsMap = array( |
@@ -143,11 +143,11 @@ discard block |
||
| 143 | 143 | 'value' => "\x1b[32m", # green |
| 144 | 144 | ); |
| 145 | 145 | |
| 146 | - return $optionsMap[$type] . $text . "\x1b[0m" . $nlAfterChar; |
|
| 146 | + return $optionsMap[$type].$text."\x1b[0m".$nlAfterChar; |
|
| 147 | 147 | break; |
| 148 | 148 | case Kint::MODE_WHITESPACE: |
| 149 | 149 | default: |
| 150 | - return $text . $nlAfterChar; |
|
| 150 | + return $text.$nlAfterChar; |
|
| 151 | 151 | break; |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -162,26 +162,26 @@ discard block |
||
| 162 | 162 | $output = ''; |
| 163 | 163 | |
| 164 | 164 | if ($kintVar->access) { |
| 165 | - $output .= ' ' . $kintVar->access; |
|
| 165 | + $output .= ' '.$kintVar->access; |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | if ($kintVar->name !== null && $kintVar->name !== '') { |
| 169 | - $output .= ' ' . KintParser::escape($kintVar->name); |
|
| 169 | + $output .= ' '.KintParser::escape($kintVar->name); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | if ($kintVar->operator) { |
| 173 | - $output .= ' ' . $kintVar->operator; |
|
| 173 | + $output .= ' '.$kintVar->operator; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | - $output .= ' ' . self::_colorize($kintVar->type, 'type', false); |
|
| 176 | + $output .= ' '.self::_colorize($kintVar->type, 'type', false); |
|
| 177 | 177 | |
| 178 | 178 | if ($kintVar->size !== null) { |
| 179 | - $output .= ' (' . $kintVar->size . ')'; |
|
| 179 | + $output .= ' ('.$kintVar->size.')'; |
|
| 180 | 180 | } |
| 181 | 181 | |
| 182 | 182 | |
| 183 | 183 | if ($kintVar->value !== null && $kintVar->value !== '') { |
| 184 | - $output .= ' ' . self::_colorize( |
|
| 184 | + $output .= ' '.self::_colorize( |
|
| 185 | 185 | $kintVar->value, # escape shell |
| 186 | 186 | 'value', |
| 187 | 187 | false |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | return |
| 205 | 205 | self::_colorize( |
| 206 | - self::_char('┌') . self::_char('─', self::$_consoleRow - 2) . self::_char('┐') . PHP_EOL |
|
| 206 | + self::_char('┌').self::_char('─', self::$_consoleRow - 2).self::_char('┐').PHP_EOL |
|
| 207 | 207 | . self::_char('│'), |
| 208 | 208 | 'title', |
| 209 | 209 | false |
@@ -212,8 +212,8 @@ discard block |
||
| 212 | 212 | . self::_colorize(str_pad($escaped, self::$_consoleRow - 2 + $lengthDifference, ' ', STR_PAD_BOTH), 'title', false) |
| 213 | 213 | |
| 214 | 214 | . self::_colorize( |
| 215 | - self::_char('│') . PHP_EOL |
|
| 216 | - . self::_char('└') . self::_char('─', self::$_consoleRow - 2) . self::_char('┘'), |
|
| 215 | + self::_char('│').PHP_EOL |
|
| 216 | + . self::_char('└').self::_char('─', self::$_consoleRow - 2).self::_char('┘'), |
|
| 217 | 217 | 'title' |
| 218 | 218 | ); |
| 219 | 219 | } |
@@ -236,11 +236,11 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | |
| 238 | 238 | $space = str_repeat($s = ' ', $level); |
| 239 | - $output .= $space . self::_drawHeader($kintVar); |
|
| 239 | + $output .= $space.self::_drawHeader($kintVar); |
|
| 240 | 240 | |
| 241 | 241 | |
| 242 | 242 | if ($kintVar->extendedValue !== null) { |
| 243 | - $output .= ' ' . ($kintVar->type === 'array' ? '[' : '(') . PHP_EOL; |
|
| 243 | + $output .= ' '.($kintVar->type === 'array' ? '[' : '(').PHP_EOL; |
|
| 244 | 244 | |
| 245 | 245 | |
| 246 | 246 | if (is_array($kintVar->extendedValue)) { |
@@ -249,12 +249,12 @@ discard block |
||
| 249 | 249 | } |
| 250 | 250 | } elseif (is_string($kintVar->extendedValue)) { |
| 251 | 251 | /** @noinspection PhpToStringImplementationInspection */ |
| 252 | - $output .= $space . $s . $kintVar->extendedValue . PHP_EOL; # "depth too great" or similar |
|
| 252 | + $output .= $space.$s.$kintVar->extendedValue.PHP_EOL; # "depth too great" or similar |
|
| 253 | 253 | } else { |
| 254 | 254 | /** @noinspection PhpParamsInspection */ |
| 255 | 255 | $output .= self::decorate($kintVar->extendedValue, $level + 1); // it's kintVariableData |
| 256 | 256 | } |
| 257 | - $output .= $space . ($kintVar->type === 'array' ? ']' : ')') . PHP_EOL; |
|
| 257 | + $output .= $space.($kintVar->type === 'array' ? ']' : ')').PHP_EOL; |
|
| 258 | 258 | } else { |
| 259 | 259 | $output .= PHP_EOL; |
| 260 | 260 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $output = self::_title('TRACE'); |
| 273 | 273 | $lastStep = count($traceData); |
| 274 | 274 | foreach ($traceData as $stepNo => $step) { |
| 275 | - $title = str_pad(++$stepNo . ': ', 4, ' '); |
|
| 275 | + $title = str_pad(++$stepNo.': ', 4, ' '); |
|
| 276 | 276 | |
| 277 | 277 | $title .= self::_colorize( |
| 278 | 278 | (isset($step['file']) ? self::_buildCalleeString($step) : 'PHP internal call'), |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | ); |
| 281 | 281 | |
| 282 | 282 | if (!empty($step['function'])) { |
| 283 | - $title .= ' ' . $step['function']; |
|
| 283 | + $title .= ' '.$step['function']; |
|
| 284 | 284 | if (isset($step['args'])) { |
| 285 | 285 | $title .= '('; |
| 286 | 286 | if (empty($step['args'])) { |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | foreach ($step['args'] as $name => $argument) { |
| 301 | 301 | $argument = KintParser::factory( |
| 302 | 302 | $argument, |
| 303 | - $name ? $appendDollar . $name : '#' . ++$i |
|
| 303 | + $name ? $appendDollar.$name : '#'.++$i |
|
| 304 | 304 | ); |
| 305 | 305 | $argument->operator = $name ? ' =' : ':'; |
| 306 | 306 | $maxLevels = Kint::$maxLevels; |
@@ -312,12 +312,12 @@ discard block |
||
| 312 | 312 | Kint::$maxLevels = $maxLevels; |
| 313 | 313 | } |
| 314 | 314 | } |
| 315 | - $output .= ' )' . PHP_EOL; |
|
| 315 | + $output .= ' )'.PHP_EOL; |
|
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | if (!empty($step['object'])) { |
| 319 | 319 | $output .= self::_colorize( |
| 320 | - ' ' . self::_char('─', 27) . ' Callee object ' . self::_char('─', 34), |
|
| 320 | + ' '.self::_char('─', 27).' Callee object '.self::_char('─', 34), |
|
| 321 | 321 | 'title' |
| 322 | 322 | ); |
| 323 | 323 | |
@@ -371,10 +371,10 @@ discard block |
||
| 371 | 371 | $lastChar = Kint::enabled() === Kint::MODE_PLAIN ? '</pre>' : ''; |
| 372 | 372 | |
| 373 | 373 | if (!Kint::$displayCalledFrom) { |
| 374 | - return $lastLine . $lastChar; |
|
| 374 | + return $lastLine.$lastChar; |
|
| 375 | 375 | } |
| 376 | 376 | |
| 377 | - return $lastLine . self::_colorize('Called from ' . self::_buildCalleeString($callee), 'title') . $lastChar; |
|
| 377 | + return $lastLine.self::_colorize('Called from '.self::_buildCalleeString($callee), 'title').$lastChar; |
|
| 378 | 378 | } |
| 379 | 379 | |
| 380 | 380 | /** |