@@ -117,14 +117,14 @@ |
||
| 117 | 117 | |
| 118 | 118 | return sprintf( |
| 119 | 119 | $reflectionFormat, |
| 120 | - $this->getDocComment() ? $this->getDocComment() . "\n" : '', |
|
| 120 | + $this->getDocComment() ? $this->getDocComment()."\n" : '', |
|
| 121 | 121 | $this->getName(), |
| 122 | 122 | $this->getFileName(), |
| 123 | 123 | $this->getStartLine(), |
| 124 | 124 | $this->getEndLine(), |
| 125 | 125 | count($this->getParameters()), |
| 126 | - array_reduce($this->getParameters(), static function ($str, ReflectionParameter $param) { |
|
| 127 | - return $str . "\n " . $param; |
|
| 126 | + array_reduce($this->getParameters(), static function($str, ReflectionParameter $param) { |
|
| 127 | + return $str."\n ".$param; |
|
| 128 | 128 | }, '') |
| 129 | 129 | ); |
| 130 | 130 | } |
@@ -93,13 +93,13 @@ |
||
| 93 | 93 | if ($type instanceof ReflectionNamedType) { |
| 94 | 94 | $displayType = $type->getName(); |
| 95 | 95 | } else { |
| 96 | - $displayType = (string)$type; |
|
| 96 | + $displayType = (string) $type; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $displayType = ltrim($displayType, '\\'); |
| 100 | 100 | |
| 101 | 101 | if ($type->allowsNull()) { |
| 102 | - $displayType = '?' . $displayType; |
|
| 102 | + $displayType = '?'.$displayType; |
|
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | return $displayType; |
@@ -24,5 +24,5 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @return string|false Path to the file with given class or false if not found |
| 26 | 26 | */ |
| 27 | - public function locateClass(string $className): bool|string; |
|
| 27 | + public function locateClass(string $className): bool | string; |
|
| 28 | 28 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * |
| 59 | 59 | * @return string|false Path to the file with given class or false if not found |
| 60 | 60 | */ |
| 61 | - public function locateClass(string $className): bool|string |
|
| 61 | + public function locateClass(string $className): bool | string |
|
| 62 | 62 | { |
| 63 | 63 | $filePath = $this->loader->findFile(ltrim($className, '\\')); |
| 64 | 64 | if (!empty($filePath)) { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | * |
| 37 | 37 | * @return string|false Path to the file with given class or false if not found |
| 38 | 38 | */ |
| 39 | - public function locateClass(string $className): bool|string |
|
| 39 | + public function locateClass(string $className): bool | string |
|
| 40 | 40 | { |
| 41 | 41 | return call_user_func($this->callable, ltrim($className, '\\')); |
| 42 | 42 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @return array|bool|string |
| 33 | 33 | */ |
| 34 | - public static function realpath(array|string $somePath, bool $shouldCheckExistence = false): bool|array|string |
|
| 34 | + public static function realpath(array | string $somePath, bool $shouldCheckExistence = false): bool | array | string |
|
| 35 | 35 | { |
| 36 | 36 | // Do not resolve empty string/false/arrays into the current path |
| 37 | 37 | if (!$somePath) { |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $isRelative = !$pathScheme && ($path[0] !== '/') && ($path[1] !== ':'); |
| 54 | 54 | if ($isRelative) { |
| 55 | - $path = getcwd() . DIRECTORY_SEPARATOR . $path; |
|
| 55 | + $path = getcwd().DIRECTORY_SEPARATOR.$path; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | // resolve path parts (single dot, double dot and double delimiters) |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | /** |
| 125 | 125 | * {@inheritDoc} |
| 126 | 126 | */ |
| 127 | - public function getDocComment(): string|false |
|
| 127 | + public function getDocComment(): string | false |
|
| 128 | 128 | { |
| 129 | 129 | $docBlock = $this->classConstantNode->getDocComment(); |
| 130 | 130 | |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | * |
| 63 | 63 | * @return bool|ReflectionFileNamespace |
| 64 | 64 | */ |
| 65 | - public function getFileNamespace(string $namespaceName): ReflectionFileNamespace|bool |
|
| 65 | + public function getFileNamespace(string $namespaceName): ReflectionFileNamespace | bool |
|
| 66 | 66 | { |
| 67 | 67 | if ($this->hasFileNamespace($namespaceName)) { |
| 68 | 68 | return $this->fileNamespaces[$namespaceName]; |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | protected function resolveScalarMagicConstMethod(): string |
| 149 | 149 | { |
| 150 | 150 | if ($this->context instanceof ReflectionMethod) { |
| 151 | - $fullName = $this->context->getDeclaringClass()->name . '::' . $this->context->getShortName(); |
|
| 151 | + $fullName = $this->context->getDeclaringClass()->name.'::'.$this->context->getShortName(); |
|
| 152 | 152 | |
| 153 | 153 | return $fullName; |
| 154 | 154 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $fileNamespace = new ReflectionFileNamespace($fileName, $namespaceName); |
| 249 | 249 | if ($fileNamespace->hasConstant($constantName)) { |
| 250 | 250 | $constantValue = $fileNamespace->getConstant($constantName); |
| 251 | - $constantName = $fileNamespace->getName() . '\\' . $constantName; |
|
| 251 | + $constantName = $fileNamespace->getName().'\\'.$constantName; |
|
| 252 | 252 | $isResolved = true; |
| 253 | 253 | } |
| 254 | 254 | } |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $reason = 'Unable'; |
| 283 | 283 | if ($classToReflect instanceof Expr) { |
| 284 | 284 | $methodName = $this->getDispatchMethodFor($classToReflect); |
| 285 | - $reason = "Method " . __CLASS__ . "::$methodName() not found trying"; |
|
| 285 | + $reason = "Method ".__CLASS__."::$methodName() not found trying"; |
|
| 286 | 286 | } |
| 287 | 287 | throw new ReflectionException("$reason to resolve class constant."); |
| 288 | 288 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | $this->isConstant = true; |
| 302 | - $this->constantName = $classToReflect . '::' . $constantName; |
|
| 302 | + $this->constantName = $classToReflect.'::'.$constantName; |
|
| 303 | 303 | |
| 304 | 304 | return $refClass->getConstant($constantName); |
| 305 | 305 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | return $this->resolve($node->left) - $this->resolve($node->right); |
| 327 | 327 | } |
| 328 | 328 | |
| 329 | - protected function resolveExprBinaryOpMul(Expr\BinaryOp\Mul $node): float|int |
|
| 329 | + protected function resolveExprBinaryOpMul(Expr\BinaryOp\Mul $node): float | int |
|
| 330 | 330 | { |
| 331 | 331 | return $this->resolve($node->left) * $this->resolve($node->right); |
| 332 | 332 | } |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | return $this->resolve($node->left) ** $this->resolve($node->right); |
| 337 | 337 | } |
| 338 | 338 | |
| 339 | - protected function resolveExprBinaryOpDiv(Expr\BinaryOp\Div $node): float|int |
|
| 339 | + protected function resolveExprBinaryOpDiv(Expr\BinaryOp\Div $node): float | int |
|
| 340 | 340 | { |
| 341 | 341 | return $this->resolve($node->left) / $this->resolve($node->right); |
| 342 | 342 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | return !$this->resolve($node->expr); |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | - protected function resolveExprBitwiseNot(Expr\BitwiseNot $node): int|string |
|
| 354 | + protected function resolveExprBitwiseNot(Expr\BitwiseNot $node): int | string |
|
| 355 | 355 | { |
| 356 | 356 | return ~$this->resolve($node->expr); |
| 357 | 357 | } |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | protected function resolveExprBinaryOpConcat(Expr\BinaryOp\Concat $node): string |
| 385 | 385 | { |
| 386 | - return $this->resolve($node->left) . $this->resolve($node->right); |
|
| 386 | + return $this->resolve($node->left).$this->resolve($node->right); |
|
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | protected function resolveExprTernary(Expr\Ternary $node) |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | { |
| 474 | 474 | $nodeType = $node->getType(); |
| 475 | 475 | |
| 476 | - return 'resolve' . str_replace('_', '', $nodeType); |
|
| 476 | + return 'resolve'.str_replace('_', '', $nodeType); |
|
| 477 | 477 | } |
| 478 | 478 | |
| 479 | 479 | /** |