@@ -147,19 +147,19 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | - $buildString = static function (array $items, $indentLevel = 4) { |
|
| 150 | + $buildString = static function(array $items, $indentLevel = 4) { |
|
| 151 | 151 | if (!count($items)) { |
| 152 | 152 | return ''; |
| 153 | 153 | } |
| 154 | - $indent = "\n" . str_repeat(' ', $indentLevel); |
|
| 154 | + $indent = "\n".str_repeat(' ', $indentLevel); |
|
| 155 | 155 | |
| 156 | - return $indent . implode($indent, explode("\n", implode("\n", $items))); |
|
| 156 | + return $indent.implode($indent, explode("\n", implode("\n", $items))); |
|
| 157 | 157 | }; |
| 158 | 158 | |
| 159 | - $buildConstants = static function (array $items, $indentLevel = 4) { |
|
| 159 | + $buildConstants = static function(array $items, $indentLevel = 4) { |
|
| 160 | 160 | $str = ''; |
| 161 | 161 | foreach ($items as $name => $value) { |
| 162 | - $str .= "\n" . str_repeat(' ', $indentLevel); |
|
| 162 | + $str .= "\n".str_repeat(' ', $indentLevel); |
|
| 163 | 163 | $str .= sprintf( |
| 164 | 164 | 'Constant [ %s %s ] { %s }', |
| 165 | 165 | gettype($value), |
@@ -184,8 +184,8 @@ discard block |
||
| 184 | 184 | ($isObject ? 'Object of class' : 'Class'), |
| 185 | 185 | $modifiers, |
| 186 | 186 | $this->getName(), |
| 187 | - false !== $parentClass ? (' extends ' . $parentClass->getName()) : '', |
|
| 188 | - $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '', |
|
| 187 | + false !== $parentClass ? (' extends '.$parentClass->getName()) : '', |
|
| 188 | + $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '', |
|
| 189 | 189 | $this->getFileName(), |
| 190 | 190 | $this->getStartLine(), |
| 191 | 191 | $this->getEndLine(), |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | { |
| 228 | 228 | if (!isset($this->constants)) { |
| 229 | 229 | $this->constants = $this->recursiveCollect( |
| 230 | - function (array &$result, \ReflectionClass $instance) { |
|
| 230 | + function(array &$result, \ReflectionClass $instance) { |
|
| 231 | 231 | $result += $instance->getConstants(); |
| 232 | 232 | } |
| 233 | 233 | ); |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | { |
| 337 | 337 | if (!isset($this->interfaceClasses)) { |
| 338 | 338 | $this->interfaceClasses = $this->recursiveCollect( |
| 339 | - function (array &$result, \ReflectionClass $instance) { |
|
| 339 | + function(array &$result, \ReflectionClass $instance) { |
|
| 340 | 340 | if ($instance->isInterface()) { |
| 341 | 341 | $result[$instance->name] = $instance; |
| 342 | 342 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | if (!isset($this->methods)) { |
| 378 | 378 | $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this); |
| 379 | 379 | $parentMethods = $this->recursiveCollect( |
| 380 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 380 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 381 | 381 | $reflectionMethods = []; |
| 382 | 382 | foreach ($instance->getMethods() as $reflectionMethod) { |
| 383 | 383 | if (!$isParent || !$reflectionMethod->isPrivate()) { |
@@ -448,9 +448,9 @@ discard block |
||
| 448 | 448 | */ |
| 449 | 449 | public function getName(): string |
| 450 | 450 | { |
| 451 | - $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : ''; |
|
| 451 | + $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : ''; |
|
| 452 | 452 | |
| 453 | - return $namespaceName . $this->getShortName(); |
|
| 453 | + return $namespaceName.$this->getShortName(); |
|
| 454 | 454 | } |
| 455 | 455 | |
| 456 | 456 | /** |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | if (!isset($this->properties)) { |
| 498 | 498 | $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName()); |
| 499 | 499 | $parentProperties = $this->recursiveCollect( |
| 500 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 500 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 501 | 501 | $reflectionProperties = []; |
| 502 | 502 | foreach ($instance->getProperties() as $reflectionProperty) { |
| 503 | 503 | if (!$isParent || !$reflectionProperty->isPrivate()) { |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | $this->getName() |
| 572 | 572 | ); |
| 573 | 573 | $parentClassConstants = $this->recursiveCollect( |
| 574 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 574 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 575 | 575 | $reflectionClassConstants = []; |
| 576 | 576 | foreach ($instance->getReflectionConstants() as $reflectionClassConstant) { |
| 577 | 577 | if (!$isParent || !$reflectionClassConstant->isPrivate()) { |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | break; |
| 626 | 626 | } |
| 627 | 627 | } |
| 628 | - $aliases[$adaptation->newName] = $traitName . '::' . $methodName; |
|
| 628 | + $aliases[$adaptation->newName] = $traitName.'::'.$methodName; |
|
| 629 | 629 | } |
| 630 | 630 | } |
| 631 | 631 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | public function __debugInfo(): array |
| 124 | 124 | { |
| 125 | 125 | return [ |
| 126 | - 'name' => (string)$this->parameterNode->var->name, |
|
| 126 | + 'name' => (string) $this->parameterNode->var->name, |
|
| 127 | 127 | ]; |
| 128 | 128 | } |
| 129 | 129 | |
@@ -141,11 +141,11 @@ discard block |
||
| 141 | 141 | if ($hasDefaultValue) { |
| 142 | 142 | $defaultValue = $this->getDefaultValue(); |
| 143 | 143 | if (is_string($defaultValue) && strlen($defaultValue) > 15) { |
| 144 | - $defaultValue = substr($defaultValue, 0, 15) . '...'; |
|
| 144 | + $defaultValue = substr($defaultValue, 0, 15).'...'; |
|
| 145 | 145 | } |
| 146 | 146 | /* @see https://3v4l.org/DJOEb for behaviour changes */ |
| 147 | 147 | if (is_float($defaultValue) && fmod($defaultValue, 1.0) === 0.0) { |
| 148 | - $defaultValue = (int)$defaultValue; |
|
| 148 | + $defaultValue = (int) $defaultValue; |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | $defaultValue = str_replace('\\\\', '\\', var_export($defaultValue, true)); |
@@ -155,11 +155,11 @@ discard block |
||
| 155 | 155 | 'Parameter #%d [ %s %s%s%s$%s%s ]', |
| 156 | 156 | $this->parameterIndex, |
| 157 | 157 | $isOptional ? '<optional>' : '<required>', |
| 158 | - $parameterType ? ReflectionType::convertToDisplayType($parameterType) . ' ' : '', |
|
| 158 | + $parameterType ? ReflectionType::convertToDisplayType($parameterType).' ' : '', |
|
| 159 | 159 | $this->isVariadic() ? '...' : '', |
| 160 | 160 | $this->isPassedByReference() ? '&' : '', |
| 161 | 161 | $this->getName(), |
| 162 | - ($isOptional && $hasDefaultValue) ? (' = ' . $defaultValue) : '' |
|
| 162 | + ($isOptional && $hasDefaultValue) ? (' = '.$defaultValue) : '' |
|
| 163 | 163 | ); |
| 164 | 164 | } |
| 165 | 165 | |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | */ |
| 269 | 269 | public function getName(): string |
| 270 | 270 | { |
| 271 | - return (string)$this->parameterNode->var->name; |
|
| 271 | + return (string) $this->parameterNode->var->name; |
|
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | /** |