@@ -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 | |
@@ -378,14 +378,14 @@ discard block |
||
| 378 | 378 | $args[$params[$i]->name] = $arg; |
| 379 | 379 | } else { |
| 380 | 380 | # assign the argument by number |
| 381 | - $args['#' . ($i + 1)] = $arg; |
|
| 381 | + $args['#'.($i + 1)] = $arg; |
|
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | } |
| 385 | 385 | |
| 386 | 386 | if (isset($step['class'])) { |
| 387 | 387 | # Class->method() or Class::method() |
| 388 | - $function = $step['class'] . $step['type'] . $function; |
|
| 388 | + $function = $step['class'].$step['type'].$function; |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | // TODO: it's possible to parse the object name out from the source! |
@@ -479,7 +479,7 @@ discard block |
||
| 479 | 479 | ); |
| 480 | 480 | |
| 481 | 481 | # set the zero-padding amount for line numbers |
| 482 | - $format = '% ' . strlen($range['end']) . 'd'; |
|
| 482 | + $format = '% '.strlen($range['end']).'d'; |
|
| 483 | 483 | |
| 484 | 484 | $source = ''; |
| 485 | 485 | while (($row = fgets($filePointer)) !== false) { |
@@ -493,13 +493,13 @@ discard block |
||
| 493 | 493 | $row = htmlspecialchars($row, ENT_NOQUOTES, 'UTF-8'); |
| 494 | 494 | |
| 495 | 495 | # trim whitespace and sanitize the row |
| 496 | - $row = '<span>' . sprintf($format, $line) . '</span> ' . $row; |
|
| 496 | + $row = '<span>'.sprintf($format, $line).'</span> '.$row; |
|
| 497 | 497 | |
| 498 | 498 | if ($line === $lineNumber) { |
| 499 | 499 | # apply highlighting to this row |
| 500 | - $row = '<div class="kint-highlight">' . $row . '</div>'; |
|
| 500 | + $row = '<div class="kint-highlight">'.$row.'</div>'; |
|
| 501 | 501 | } else { |
| 502 | - $row = '<div>' . $row . '</div>'; |
|
| 502 | + $row = '<div>'.$row.'</div>'; |
|
| 503 | 503 | } |
| 504 | 504 | |
| 505 | 505 | # add to the captured source |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | $path = str_replace('\\', '/', $path); |
| 810 | 810 | |
| 811 | 811 | if (strpos($file, $path) === 0) { |
| 812 | - $shortenedName = $replaceString . substr($file, strlen($path)); |
|
| 812 | + $shortenedName = $replaceString.substr($file, strlen($path)); |
|
| 813 | 813 | $replaced = true; |
| 814 | 814 | break; |
| 815 | 815 | } |
@@ -827,7 +827,7 @@ discard block |
||
| 827 | 827 | } |
| 828 | 828 | } |
| 829 | 829 | |
| 830 | - $shortenedName = ($i ? '.../' : '') . implode('/', array_slice($fileParts, $i)); |
|
| 830 | + $shortenedName = ($i ? '.../' : '').implode('/', array_slice($fileParts, $i)); |
|
| 831 | 831 | } |
| 832 | 832 | |
| 833 | 833 | return $shortenedName; |
@@ -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 | |