@@ -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) |
@@ -148,7 +148,9 @@ |
||
| 148 | 148 | } |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - if ($quoteString === null) $quoteString = true; |
|
| 151 | + if ($quoteString === null) { |
|
| 152 | + $quoteString = true; |
|
| 153 | + } |
|
| 152 | 154 | break; |
| 153 | 155 | |
| 154 | 156 | case 'boolean': |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $namespaceName .= '\\'; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - $default = $namespaceName . $defaultNode->name->toString(); |
|
| 138 | + $default = $namespaceName.$defaultNode->name->toString(); |
|
| 139 | 139 | $checkType = false; |
| 140 | 140 | } |
| 141 | 141 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | if (PHP_VERSION_ID < 80100) { |
| 172 | 172 | // If longer than 15 characters, truncate it |
| 173 | 173 | if (strlen($default) > 15) { |
| 174 | - $default = substr($default, 0, 15) . '...'; |
|
| 174 | + $default = substr($default, 0, 15).'...'; |
|
| 175 | 175 | } |
| 176 | 176 | } |
| 177 | 177 | |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | $afterPoint = strlen(substr((string) strrchr((string) $default, "."), 1)); |
| 192 | 192 | $default = (string) round($default, 15); |
| 193 | 193 | if (!str_contains((string) $default, '.')) { |
| 194 | - $default .= '.' . $afterPoint; |
|
| 194 | + $default .= '.'.$afterPoint; |
|
| 195 | 195 | } |
| 196 | 196 | } |
| 197 | 197 | break; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * |
| 243 | 243 | * @return PropertyProperty|Param |
| 244 | 244 | */ |
| 245 | - public function getNode(): PropertyProperty|Param |
|
| 245 | + public function getNode(): PropertyProperty | Param |
|
| 246 | 246 | { |
| 247 | 247 | if ($this->isPromoted()) { |
| 248 | 248 | return $this->paramNode; |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | /** |
| 313 | 313 | * {@inheritDoc} |
| 314 | 314 | */ |
| 315 | - public function getDocComment(): string|false |
|
| 315 | + public function getDocComment(): string | false |
|
| 316 | 316 | { |
| 317 | 317 | if ($this->isPromoted()) { |
| 318 | 318 | $docBlock = $this->paramNode->getDocComment(); |
@@ -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]; |