@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | $isRelative = !$pathScheme && ($path[0] !== '/') && ($path[1] !== ':'); |
52 | 52 | if ($isRelative) { |
53 | - $path = getcwd() . DIRECTORY_SEPARATOR . $path; |
|
53 | + $path = getcwd().DIRECTORY_SEPARATOR.$path; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | // resolve path parts (single dot, double dot and double delimiters) |
@@ -504,7 +504,7 @@ |
||
504 | 504 | |
505 | 505 | if (method_exists($this->context, 'getDeclaringClass')) { |
506 | 506 | return $this->context->getDeclaringClass() |
507 | - ->getParentClass() |
|
507 | + ->getParentClass() |
|
508 | 508 | ; |
509 | 509 | } |
510 | 510 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | protected function resolveScalarMagicConstMethod(): string |
151 | 151 | { |
152 | 152 | if ($this->context instanceof ReflectionMethod) { |
153 | - $fullName = $this->context->getDeclaringClass()->name . '::' . $this->context->getShortName(); |
|
153 | + $fullName = $this->context->getDeclaringClass()->name.'::'.$this->context->getShortName(); |
|
154 | 154 | |
155 | 155 | return $fullName; |
156 | 156 | } |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | $fileNamespace = new ReflectionFileNamespace($fileName, $namespaceName); |
242 | 242 | if ($fileNamespace->hasConstant($constantName)) { |
243 | 243 | $constantValue = $fileNamespace->getConstant($constantName); |
244 | - $constantName = $fileNamespace->getName() . '\\' . $constantName; |
|
244 | + $constantName = $fileNamespace->getName().'\\'.$constantName; |
|
245 | 245 | $isResolved = true; |
246 | 246 | } |
247 | 247 | } |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | $reason = 'Unable'; |
268 | 268 | if ($classToReflect instanceof Expr) { |
269 | 269 | $methodName = $this->getDispatchMethodFor($classToReflect); |
270 | - $reason = "Method " . __CLASS__ . "::{$methodName}() not found trying"; |
|
270 | + $reason = "Method ".__CLASS__."::{$methodName}() not found trying"; |
|
271 | 271 | } |
272 | 272 | throw new ReflectionException("$reason to resolve class constant."); |
273 | 273 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | } |
285 | 285 | |
286 | 286 | $this->isConstant = true; |
287 | - $this->constantName = $classToReflect . '::' . $constantName; |
|
287 | + $this->constantName = $classToReflect.'::'.$constantName; |
|
288 | 288 | |
289 | 289 | return $refClass->getConstant($constantName); |
290 | 290 | } |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | |
369 | 369 | protected function resolveExprBinaryOpConcat(Expr\BinaryOp\Concat $node): string |
370 | 370 | { |
371 | - return $this->resolve($node->left) . $this->resolve($node->right); |
|
371 | + return $this->resolve($node->left).$this->resolve($node->right); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | protected function resolveExprTernary(Expr\Ternary $node) |
@@ -453,7 +453,7 @@ discard block |
||
453 | 453 | { |
454 | 454 | $nodeType = $node->getType(); |
455 | 455 | |
456 | - return 'resolve' . str_replace('_', '', $nodeType); |
|
456 | + return 'resolve'.str_replace('_', '', $nodeType); |
|
457 | 457 | } |
458 | 458 | |
459 | 459 | /** |
@@ -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 | } |
@@ -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 |
@@ -88,13 +88,13 @@ |
||
88 | 88 | if ($type instanceof ReflectionNamedType) { |
89 | 89 | $displayType = $type->getName(); |
90 | 90 | } else { |
91 | - $displayType = (string)$type; |
|
91 | + $displayType = (string) $type; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $displayType = ltrim($displayType, '\\'); |
95 | 95 | |
96 | - if ($type->allowsNull() && ! $type instanceof ReflectionUnionType) { |
|
97 | - $displayType = '?' . $displayType; |
|
96 | + if ($type->allowsNull() && !$type instanceof ReflectionUnionType) { |
|
97 | + $displayType = '?'.$displayType; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | return $displayType; |
@@ -108,12 +108,12 @@ |
||
108 | 108 | $paramString = ''; |
109 | 109 | $indentation = str_repeat(' ', 4); |
110 | 110 | foreach ($methodParameters as $methodParameter) { |
111 | - $paramString .= "\n{$indentation}" . $methodParameter; |
|
111 | + $paramString .= "\n{$indentation}".$methodParameter; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | return sprintf( |
115 | 115 | "%sMethod [ <user%s%s>%s%s%s %s method %s ] {\n @@ %s %d - %d{$paramFormat}{$returnFormat}\n}\n", |
116 | - $this->getDocComment() ? $this->getDocComment() . "\n" : '', |
|
116 | + $this->getDocComment() ? $this->getDocComment()."\n" : '', |
|
117 | 117 | $prototype ? ", overwrites {$prototypeClass}, prototype {$prototypeClass}" : '', |
118 | 118 | $this->isConstructor() ? ', ctor' : '', |
119 | 119 | $this->isFinal() ? ' final' : '', |
@@ -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 | |
@@ -149,11 +149,11 @@ discard block |
||
149 | 149 | 'Parameter #%d [ %s %s%s%s$%s%s ]', |
150 | 150 | $this->parameterIndex, |
151 | 151 | $isOptional ? '<optional>' : '<required>', |
152 | - $parameterType ? ReflectionType::convertToDisplayType($parameterType) . ' ' : '', |
|
152 | + $parameterType ? ReflectionType::convertToDisplayType($parameterType).' ' : '', |
|
153 | 153 | $this->isVariadic() ? '...' : '', |
154 | 154 | $this->isPassedByReference() ? '&' : '', |
155 | 155 | $this->getName(), |
156 | - ($isOptional && $hasDefaultValue) ? (' = ' . $defaultValue) : '' |
|
156 | + ($isOptional && $hasDefaultValue) ? (' = '.$defaultValue) : '' |
|
157 | 157 | ); |
158 | 158 | } |
159 | 159 | |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | */ |
263 | 263 | public function getName(): string |
264 | 264 | { |
265 | - return (string)$this->parameterNode->var->name; |
|
265 | + return (string) $this->parameterNode->var->name; |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | /** |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | $this->__initialize(); |
120 | 120 | $defaultValue = $this->getDefaultValue(); |
121 | 121 | $defaultValueDisplay = is_array($defaultValue) |
122 | - ? '= ' . $defaultValue |
|
123 | - : '= ' . str_replace('\\', '\\', var_export($defaultValue, true)); |
|
122 | + ? '= '.$defaultValue |
|
123 | + : '= '.str_replace('\\', '\\', var_export($defaultValue, true)); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | return sprintf( |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * @inheritDoc |
144 | 144 | */ |
145 | - public function getDocComment(): string|false |
|
145 | + public function getDocComment(): string | false |
|
146 | 146 | { |
147 | 147 | $docBlock = $this->propertyTypeNode->getDocComment(); |
148 | 148 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return parent::getClosureThis(); |
72 | 72 | } |
73 | 73 | |
74 | - public function getDocComment(): string|false |
|
74 | + public function getDocComment(): string | false |
|
75 | 75 | { |
76 | 76 | $docComment = $this->functionLikeNode->getDocComment(); |
77 | 77 | |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | return null; |
89 | 89 | } |
90 | 90 | |
91 | - public function getExtensionName(): string|false |
|
91 | + public function getExtensionName(): string | false |
|
92 | 92 | { |
93 | 93 | return false; |
94 | 94 | } |
95 | 95 | |
96 | - public function getFileName(): string|false |
|
96 | + public function getFileName(): string | false |
|
97 | 97 | { |
98 | 98 | return $this->functionLikeNode->getAttribute('fileName'); |
99 | 99 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | if ($this->functionLikeNode instanceof Function_ || $this->functionLikeNode instanceof ClassMethod) { |
107 | 107 | $functionName = $this->functionLikeNode->name->toString(); |
108 | 108 | |
109 | - return $this->namespaceName ? $this->namespaceName . '\\' . $functionName : $functionName; |
|
109 | + return $this->namespaceName ? $this->namespaceName.'\\'.$functionName : $functionName; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return ''; |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | foreach ($this->functionLikeNode->getParams() as $parameterIndex => $parameterNode) { |
159 | 159 | $reflectionParameter = new ReflectionParameter( |
160 | 160 | $this->getName(), |
161 | - (string)$parameterNode->var->name, |
|
161 | + (string) $parameterNode->var->name, |
|
162 | 162 | $parameterNode, |
163 | 163 | $parameterIndex, |
164 | 164 | $this |