@@ -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'])) { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | $url = Kint::getIdeLink($callee['file'], $callee['line']); |
57 | - $shortenedName = Kint::shortenPath($callee['file']) . ':' . $callee['line']; |
|
57 | + $shortenedName = Kint::shortenPath($callee['file']).':'.$callee['line']; |
|
58 | 58 | |
59 | 59 | if (Kint::enabled() === Kint::MODE_PLAIN) { |
60 | 60 | if (strpos($url, 'http://') === 0) { |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | break; |
93 | 93 | } |
94 | 94 | |
95 | - return $repeat ? str_repeat($char, $repeat) : (string)$char; |
|
95 | + return $repeat ? str_repeat($char, $repeat) : (string) $char; |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | switch (Kint::enabled()) { |
110 | 110 | case Kint::MODE_PLAIN: |
111 | 111 | if (!self::$_enableColors) { |
112 | - return $text . $nlAfterChar; |
|
112 | + return $text.$nlAfterChar; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | switch ($type) { |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | break; |
125 | 125 | } |
126 | 126 | |
127 | - return $text . $nlAfterChar; |
|
127 | + return $text.$nlAfterChar; |
|
128 | 128 | break; |
129 | 129 | case Kint::MODE_CLI: |
130 | 130 | if (!self::$_enableColors) { |
131 | - return $text . $nlAfterChar; |
|
131 | + return $text.$nlAfterChar; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $optionsMap = array( |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | 'value' => "\x1b[32m", # green |
138 | 138 | ); |
139 | 139 | |
140 | - return $optionsMap[$type] . $text . "\x1b[0m" . $nlAfterChar; |
|
140 | + return $optionsMap[$type].$text."\x1b[0m".$nlAfterChar; |
|
141 | 141 | break; |
142 | 142 | case Kint::MODE_WHITESPACE: |
143 | 143 | default: |
144 | - return $text . $nlAfterChar; |
|
144 | + return $text.$nlAfterChar; |
|
145 | 145 | break; |
146 | 146 | } |
147 | 147 | } |
@@ -156,26 +156,26 @@ discard block |
||
156 | 156 | $output = ''; |
157 | 157 | |
158 | 158 | if ($kintVar->access) { |
159 | - $output .= ' ' . $kintVar->access; |
|
159 | + $output .= ' '.$kintVar->access; |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | if ($kintVar->name !== null && $kintVar->name !== '') { |
163 | - $output .= ' ' . KintParser::escape($kintVar->name); |
|
163 | + $output .= ' '.KintParser::escape($kintVar->name); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | if ($kintVar->operator) { |
167 | - $output .= ' ' . $kintVar->operator; |
|
167 | + $output .= ' '.$kintVar->operator; |
|
168 | 168 | } |
169 | 169 | |
170 | - $output .= ' ' . self::_colorize($kintVar->type, 'type', false); |
|
170 | + $output .= ' '.self::_colorize($kintVar->type, 'type', false); |
|
171 | 171 | |
172 | 172 | if ($kintVar->size !== null) { |
173 | - $output .= ' (' . $kintVar->size . ')'; |
|
173 | + $output .= ' ('.$kintVar->size.')'; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | |
177 | 177 | if ($kintVar->value !== null && $kintVar->value !== '') { |
178 | - $output .= ' ' . self::_colorize( |
|
178 | + $output .= ' '.self::_colorize( |
|
179 | 179 | $kintVar->value, # escape shell |
180 | 180 | 'value', |
181 | 181 | false |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | |
198 | 198 | return |
199 | 199 | self::_colorize( |
200 | - self::_char('┌') . self::_char('─', 78) . self::_char('┐') . PHP_EOL |
|
200 | + self::_char('┌').self::_char('─', 78).self::_char('┐').PHP_EOL |
|
201 | 201 | . self::_char('│'), |
202 | 202 | 'title', |
203 | 203 | false |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | . self::_colorize(str_pad($escaped, 78 + $lengthDifference, ' ', STR_PAD_BOTH), 'title', false) |
207 | 207 | |
208 | 208 | . self::_colorize( |
209 | - self::_char('│') . PHP_EOL |
|
210 | - . self::_char('└') . self::_char('─', 78) . self::_char('┘'), |
|
209 | + self::_char('│').PHP_EOL |
|
210 | + . self::_char('└').self::_char('─', 78).self::_char('┘'), |
|
211 | 211 | 'title' |
212 | 212 | ); |
213 | 213 | } |
@@ -230,11 +230,11 @@ discard block |
||
230 | 230 | |
231 | 231 | |
232 | 232 | $space = str_repeat($s = ' ', $level); |
233 | - $output .= $space . self::_drawHeader($kintVar); |
|
233 | + $output .= $space.self::_drawHeader($kintVar); |
|
234 | 234 | |
235 | 235 | |
236 | 236 | if ($kintVar->extendedValue !== null) { |
237 | - $output .= ' ' . ($kintVar->type === 'array' ? '[' : '(') . PHP_EOL; |
|
237 | + $output .= ' '.($kintVar->type === 'array' ? '[' : '(').PHP_EOL; |
|
238 | 238 | |
239 | 239 | |
240 | 240 | if (is_array($kintVar->extendedValue)) { |
@@ -243,12 +243,12 @@ discard block |
||
243 | 243 | } |
244 | 244 | } elseif (is_string($kintVar->extendedValue)) { |
245 | 245 | /** @noinspection PhpToStringImplementationInspection */ |
246 | - $output .= $space . $s . $kintVar->extendedValue . PHP_EOL; # "depth too great" or similar |
|
246 | + $output .= $space.$s.$kintVar->extendedValue.PHP_EOL; # "depth too great" or similar |
|
247 | 247 | } else { |
248 | 248 | /** @noinspection PhpParamsInspection */ |
249 | 249 | $output .= self::decorate($kintVar->extendedValue, $level + 1); // it's kintVariableData |
250 | 250 | } |
251 | - $output .= $space . ($kintVar->type === 'array' ? ']' : ')') . PHP_EOL; |
|
251 | + $output .= $space.($kintVar->type === 'array' ? ']' : ')').PHP_EOL; |
|
252 | 252 | } else { |
253 | 253 | $output .= PHP_EOL; |
254 | 254 | } |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | $output = self::_title('TRACE'); |
267 | 267 | $lastStep = count($traceData); |
268 | 268 | foreach ($traceData as $stepNo => $step) { |
269 | - $title = str_pad(++$stepNo . ': ', 4, ' '); |
|
269 | + $title = str_pad(++$stepNo.': ', 4, ' '); |
|
270 | 270 | |
271 | 271 | $title .= self::_colorize( |
272 | 272 | (isset($step['file']) ? self::_buildCalleeString($step) : 'PHP internal call'), |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | ); |
275 | 275 | |
276 | 276 | if (!empty($step['function'])) { |
277 | - $title .= ' ' . $step['function']; |
|
277 | + $title .= ' '.$step['function']; |
|
278 | 278 | if (isset($step['args'])) { |
279 | 279 | $title .= '('; |
280 | 280 | if (empty($step['args'])) { |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | foreach ($step['args'] as $name => $argument) { |
295 | 295 | $argument = KintParser::factory( |
296 | 296 | $argument, |
297 | - $name ? $appendDollar . $name : '#' . ++$i |
|
297 | + $name ? $appendDollar.$name : '#'.++$i |
|
298 | 298 | ); |
299 | 299 | $argument->operator = $name ? ' =' : ':'; |
300 | 300 | $maxLevels = Kint::$maxLevels; |
@@ -306,12 +306,12 @@ discard block |
||
306 | 306 | Kint::$maxLevels = $maxLevels; |
307 | 307 | } |
308 | 308 | } |
309 | - $output .= ' )' . PHP_EOL; |
|
309 | + $output .= ' )'.PHP_EOL; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | if (!empty($step['object'])) { |
313 | 313 | $output .= self::_colorize( |
314 | - ' ' . self::_char('─', 27) . ' Callee object ' . self::_char('─', 34), |
|
314 | + ' '.self::_char('─', 27).' Callee object '.self::_char('─', 34), |
|
315 | 315 | 'title' |
316 | 316 | ); |
317 | 317 | |
@@ -365,10 +365,10 @@ discard block |
||
365 | 365 | $lastChar = Kint::enabled() === Kint::MODE_PLAIN ? '</pre>' : ''; |
366 | 366 | |
367 | 367 | if (!Kint::$displayCalledFrom) { |
368 | - return $lastLine . $lastChar; |
|
368 | + return $lastLine.$lastChar; |
|
369 | 369 | } |
370 | 370 | |
371 | - return $lastLine . self::_colorize('Called from ' . self::_buildCalleeString($callee), 'title') . $lastChar; |
|
371 | + return $lastLine.self::_colorize('Called from '.self::_buildCalleeString($callee), 'title').$lastChar; |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | /** |
@@ -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 = '::'; |
@@ -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; |
@@ -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 */ |