@@ -70,14 +70,14 @@ discard block |
||
70 | 70 | return parent::getClosureThis(); |
71 | 71 | } |
72 | 72 | |
73 | - public function getDocComment(): string|false |
|
73 | + public function getDocComment(): string | false |
|
74 | 74 | { |
75 | 75 | $docComment = $this->functionLikeNode->getDocComment(); |
76 | 76 | |
77 | 77 | return $docComment ? $docComment->getText() : false; |
78 | 78 | } |
79 | 79 | |
80 | - public function getEndLine(): int|false |
|
80 | + public function getEndLine(): int | false |
|
81 | 81 | { |
82 | 82 | return $this->functionLikeNode->getAttribute('endLine'); |
83 | 83 | } |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | return null; |
88 | 88 | } |
89 | 89 | |
90 | - public function getExtensionName(): string|false |
|
90 | + public function getExtensionName(): string | false |
|
91 | 91 | { |
92 | 92 | return false; |
93 | 93 | } |
94 | 94 | |
95 | - public function getFileName(): string|false |
|
95 | + public function getFileName(): string | false |
|
96 | 96 | { |
97 | 97 | return $this->functionLikeNode->getAttribute('fileName'); |
98 | 98 | } |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | if ($this->functionLikeNode instanceof Function_ || $this->functionLikeNode instanceof ClassMethod) { |
106 | 106 | $functionName = $this->functionLikeNode->name->toString(); |
107 | 107 | |
108 | - return $this->namespaceName ? $this->namespaceName . '\\' . $functionName : $functionName; |
|
108 | + return $this->namespaceName ? $this->namespaceName.'\\'.$functionName : $functionName; |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | return false; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | foreach ($this->functionLikeNode->getParams() as $parameterIndex => $parameterNode) { |
162 | 162 | $reflectionParameter = new ReflectionParameter( |
163 | 163 | $this->getName(), |
164 | - (string)$parameterNode->var->name, |
|
164 | + (string) $parameterNode->var->name, |
|
165 | 165 | $parameterNode, |
166 | 166 | $parameterIndex, |
167 | 167 | $this |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | return false; |
221 | 221 | } |
222 | 222 | |
223 | - public function getStartLine(): int|false |
|
223 | + public function getStartLine(): int | false |
|
224 | 224 | { |
225 | 225 | return $this->functionLikeNode->getAttribute('startLine'); |
226 | 226 | } |
@@ -146,19 +146,19 @@ discard block |
||
146 | 146 | } |
147 | 147 | } |
148 | 148 | |
149 | - $buildString = static function (array $items, $indentLevel = 4) { |
|
149 | + $buildString = static function(array $items, $indentLevel = 4) { |
|
150 | 150 | if (!count($items)) { |
151 | 151 | return ''; |
152 | 152 | } |
153 | - $indent = "\n" . str_repeat(' ', $indentLevel); |
|
153 | + $indent = "\n".str_repeat(' ', $indentLevel); |
|
154 | 154 | |
155 | - return $indent . implode($indent, explode("\n", implode("\n", $items))); |
|
155 | + return $indent.implode($indent, explode("\n", implode("\n", $items))); |
|
156 | 156 | }; |
157 | 157 | |
158 | - $buildConstants = static function (array $items, $indentLevel = 4) { |
|
158 | + $buildConstants = static function(array $items, $indentLevel = 4) { |
|
159 | 159 | $str = ''; |
160 | 160 | foreach ($items as $name => $value) { |
161 | - $str .= "\n" . str_repeat(' ', $indentLevel); |
|
161 | + $str .= "\n".str_repeat(' ', $indentLevel); |
|
162 | 162 | $str .= sprintf( |
163 | 163 | 'Constant [ %s %s ] { %s }', |
164 | 164 | gettype($value), |
@@ -183,8 +183,8 @@ discard block |
||
183 | 183 | ($isObject ? 'Object of class' : 'Class'), |
184 | 184 | $modifiers, |
185 | 185 | $this->getName(), |
186 | - false !== $parentClass ? (' extends ' . $parentClass->getName()) : '', |
|
187 | - $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '', |
|
186 | + false !== $parentClass ? (' extends '.$parentClass->getName()) : '', |
|
187 | + $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '', |
|
188 | 188 | $this->getFileName(), |
189 | 189 | $this->getStartLine(), |
190 | 190 | $this->getEndLine(), |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | { |
226 | 226 | if (!isset($this->constants)) { |
227 | 227 | $this->constants = $this->recursiveCollect( |
228 | - function (array &$result, \ReflectionClass $instance) { |
|
228 | + function(array &$result, \ReflectionClass $instance) { |
|
229 | 229 | $result += $instance->getConstants(); |
230 | 230 | } |
231 | 231 | ); |
@@ -289,14 +289,14 @@ discard block |
||
289 | 289 | /** |
290 | 290 | * {@inheritDoc} |
291 | 291 | */ |
292 | - public function getDocComment(): string|false |
|
292 | + public function getDocComment(): string | false |
|
293 | 293 | { |
294 | 294 | $docComment = $this->classLikeNode->getDocComment(); |
295 | 295 | |
296 | 296 | return $docComment ? $docComment->getText() : false; |
297 | 297 | } |
298 | 298 | |
299 | - public function getEndLine(): int|false |
|
299 | + public function getEndLine(): int | false |
|
300 | 300 | { |
301 | 301 | return $this->classLikeNode->getAttribute('endLine'); |
302 | 302 | } |
@@ -306,12 +306,12 @@ discard block |
||
306 | 306 | return null; |
307 | 307 | } |
308 | 308 | |
309 | - public function getExtensionName(): string|false |
|
309 | + public function getExtensionName(): string | false |
|
310 | 310 | { |
311 | 311 | return false; |
312 | 312 | } |
313 | 313 | |
314 | - public function getFileName(): string|false |
|
314 | + public function getFileName(): string | false |
|
315 | 315 | { |
316 | 316 | return $this->classLikeNode->getAttribute('fileName'); |
317 | 317 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | { |
332 | 332 | if (!isset($this->interfaceClasses)) { |
333 | 333 | $this->interfaceClasses = $this->recursiveCollect( |
334 | - function (array &$result, \ReflectionClass $instance) { |
|
334 | + function(array &$result, \ReflectionClass $instance) { |
|
335 | 335 | if ($instance->isInterface()) { |
336 | 336 | $result[$instance->name] = $instance; |
337 | 337 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if (!isset($this->methods)) { |
372 | 372 | $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this); |
373 | 373 | $parentMethods = $this->recursiveCollect( |
374 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
374 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
375 | 375 | $reflectionMethods = []; |
376 | 376 | foreach ($instance->getMethods() as $reflectionMethod) { |
377 | 377 | if (!$isParent || !$reflectionMethod->isPrivate()) { |
@@ -442,9 +442,9 @@ discard block |
||
442 | 442 | */ |
443 | 443 | public function getName(): string |
444 | 444 | { |
445 | - $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : ''; |
|
445 | + $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : ''; |
|
446 | 446 | |
447 | - return $namespaceName . $this->getShortName(); |
|
447 | + return $namespaceName.$this->getShortName(); |
|
448 | 448 | } |
449 | 449 | |
450 | 450 | /** |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | /** |
459 | 459 | * {@inheritDoc} |
460 | 460 | */ |
461 | - public function getParentClass(): \ReflectionClass|false |
|
461 | + public function getParentClass(): \ReflectionClass | false |
|
462 | 462 | { |
463 | 463 | if (!isset($this->parentClass)) { |
464 | 464 | static $extendsField = 'extends'; |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | if (!isset($this->properties)) { |
490 | 490 | $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName()); |
491 | 491 | $parentProperties = $this->recursiveCollect( |
492 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
492 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
493 | 493 | $reflectionProperties = []; |
494 | 494 | foreach ($instance->getProperties() as $reflectionProperty) { |
495 | 495 | if (!$isParent || !$reflectionProperty->isPrivate()) { |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | /** |
539 | 539 | * @inheritDoc |
540 | 540 | */ |
541 | - public function getReflectionConstant(string $name): ReflectionClassConstant|false |
|
541 | + public function getReflectionConstant(string $name): ReflectionClassConstant | false |
|
542 | 542 | { |
543 | 543 | $classConstants = $this->getReflectionConstants(); |
544 | 544 | foreach ($classConstants as $classConstant) { |
@@ -561,7 +561,7 @@ discard block |
||
561 | 561 | $this->getName() |
562 | 562 | ); |
563 | 563 | $parentClassConstants = $this->recursiveCollect( |
564 | - function (array &$result, \ReflectionClass $instance, $isParent) { |
|
564 | + function(array &$result, \ReflectionClass $instance, $isParent) { |
|
565 | 565 | $reflectionClassConstants = []; |
566 | 566 | foreach ($instance->getReflectionConstants() as $reflectionClassConstant) { |
567 | 567 | if (!$isParent || !$reflectionClassConstant->isPrivate()) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | return $this->className; |
588 | 588 | } |
589 | 589 | |
590 | - public function getStartLine(): int|false |
|
590 | + public function getStartLine(): int | false |
|
591 | 591 | { |
592 | 592 | return $this->classLikeNode->getAttribute('startLine'); |
593 | 593 | } |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | break; |
615 | 615 | } |
616 | 616 | } |
617 | - $aliases[$adaptation->newName] = $traitName . '::' . $methodName; |
|
617 | + $aliases[$adaptation->newName] = $traitName.'::'.$methodName; |
|
618 | 618 | } |
619 | 619 | } |
620 | 620 | |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | * {@inheritDoc} |
701 | 701 | * @param string $interfaceName |
702 | 702 | */ |
703 | - public function implementsInterface(\ReflectionClass|string $interfaceName): bool |
|
703 | + public function implementsInterface(\ReflectionClass | string $interfaceName): bool |
|
704 | 704 | { |
705 | 705 | $allInterfaces = $this->getInterfaces(); |
706 | 706 | |
@@ -825,7 +825,7 @@ discard block |
||
825 | 825 | /** |
826 | 826 | * {@inheritDoc} |
827 | 827 | */ |
828 | - public function isSubclassOf(\ReflectionClass|string $class): bool |
|
828 | + public function isSubclassOf(\ReflectionClass | string $class): bool |
|
829 | 829 | { |
830 | 830 | if (is_object($class)) { |
831 | 831 | if ($class instanceof ReflectionClass) { |
@@ -119,7 +119,7 @@ |
||
119 | 119 | /** |
120 | 120 | * @inheritDoc |
121 | 121 | */ |
122 | - public function getDocComment(): string|false |
|
122 | + public function getDocComment(): string | false |
|
123 | 123 | { |
124 | 124 | $docBlock = $this->classConstantNode->getDocComment(); |
125 | 125 |
@@ -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 | /** |
@@ -132,7 +132,7 @@ |
||
132 | 132 | /** |
133 | 133 | * @inheritDoc |
134 | 134 | */ |
135 | - public function getDocComment(): string|false |
|
135 | + public function getDocComment(): string | false |
|
136 | 136 | { |
137 | 137 | $docBlock = $this->propertyTypeNode->getDocComment(); |
138 | 138 |