@@ -133,17 +133,17 @@ discard block |
||
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - $buildString = function (array $items, $indentLevel = 4) { |
|
| 136 | + $buildString = function(array $items, $indentLevel = 4) { |
|
| 137 | 137 | if (!count($items)) { |
| 138 | 138 | return ''; |
| 139 | 139 | } |
| 140 | - $indent = "\n" . str_repeat(' ', $indentLevel); |
|
| 141 | - return $indent . implode($indent, explode("\n", implode("\n", $items))); |
|
| 140 | + $indent = "\n".str_repeat(' ', $indentLevel); |
|
| 141 | + return $indent.implode($indent, explode("\n", implode("\n", $items))); |
|
| 142 | 142 | }; |
| 143 | - $buildConstants = function (array $items, $indentLevel = 4) { |
|
| 143 | + $buildConstants = function(array $items, $indentLevel = 4) { |
|
| 144 | 144 | $str = ''; |
| 145 | 145 | foreach ($items as $name => $value) { |
| 146 | - $str .= "\n" . str_repeat(' ', $indentLevel); |
|
| 146 | + $str .= "\n".str_repeat(' ', $indentLevel); |
|
| 147 | 147 | $str .= sprintf( |
| 148 | 148 | 'Constant [ %s %s ] { %s }', |
| 149 | 149 | gettype($value), |
@@ -167,8 +167,8 @@ discard block |
||
| 167 | 167 | ($isObject ? 'Object of class' : 'Class'), |
| 168 | 168 | $modifiers, |
| 169 | 169 | $this->getName(), |
| 170 | - false !== $parentClass ? (' extends ' . $parentClass->getName()) : '', |
|
| 171 | - $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '', |
|
| 170 | + false !== $parentClass ? (' extends '.$parentClass->getName()) : '', |
|
| 171 | + $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '', |
|
| 172 | 172 | $this->getFileName(), |
| 173 | 173 | $this->getStartLine(), |
| 174 | 174 | $this->getEndLine(), |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | { |
| 210 | 210 | if (!isset($this->constants)) { |
| 211 | 211 | $directConstants = $this->findConstants(); |
| 212 | - $parentConstants = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) { |
|
| 212 | + $parentConstants = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) { |
|
| 213 | 213 | $result += $instance->getConstants(); |
| 214 | 214 | }); |
| 215 | 215 | $constants = $directConstants + $parentConstants; |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | $staticOrder = [true, false]; |
| 249 | 249 | foreach ($staticOrder as $shouldBeStatic) { |
| 250 | 250 | foreach ($properties as $property) { |
| 251 | - $isStaticProperty = $property->isStatic(); |
|
| 251 | + $isStaticProperty = $property->isStatic(); |
|
| 252 | 252 | if ($shouldBeStatic !== $isStaticProperty) { |
| 253 | 253 | continue; |
| 254 | 254 | } |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | public function getInterfaces() |
| 313 | 313 | { |
| 314 | 314 | if (!isset($this->interfaceClasses)) { |
| 315 | - $this->interfaceClasses = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) { |
|
| 315 | + $this->interfaceClasses = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) { |
|
| 316 | 316 | if ($instance->isInterface()) { |
| 317 | 317 | $result[$instance->name] = $instance; |
| 318 | 318 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | { |
| 350 | 350 | if (!isset($this->methods)) { |
| 351 | 351 | $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this); |
| 352 | - $parentMethods = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 352 | + $parentMethods = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 353 | 353 | $reflectionMethods = []; |
| 354 | 354 | foreach ($instance->getMethods() as $reflectionMethod) { |
| 355 | 355 | if (!$isParent || !$reflectionMethod->isPrivate()) { |
@@ -419,9 +419,9 @@ discard block |
||
| 419 | 419 | */ |
| 420 | 420 | public function getName() |
| 421 | 421 | { |
| 422 | - $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : ''; |
|
| 422 | + $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : ''; |
|
| 423 | 423 | |
| 424 | - return $namespaceName . $this->getShortName(); |
|
| 424 | + return $namespaceName.$this->getShortName(); |
|
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | /** |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | { |
| 466 | 466 | if (!isset($this->properties)) { |
| 467 | 467 | $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName()); |
| 468 | - $parentProperties = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 468 | + $parentProperties = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 469 | 469 | $reflectionProperties = []; |
| 470 | 470 | foreach ($instance->getProperties() as $reflectionProperty) { |
| 471 | 471 | if (!$isParent || !$reflectionProperty->isPrivate()) { |
@@ -545,7 +545,7 @@ discard block |
||
| 545 | 545 | break; |
| 546 | 546 | } |
| 547 | 547 | } |
| 548 | - $aliases[$adaptation->newName] = $traitName . '::'. $methodName; |
|
| 548 | + $aliases[$adaptation->newName] = $traitName.'::'.$methodName; |
|
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | ++$this->nodeLevel; |
| 114 | 114 | |
| 115 | 115 | $nodeType = $node->getType(); |
| 116 | - $methodName = 'resolve' . str_replace('_', '', $nodeType); |
|
| 116 | + $methodName = 'resolve'.str_replace('_', '', $nodeType); |
|
| 117 | 117 | if (method_exists($this, $methodName)) { |
| 118 | 118 | $value = $this->$methodName($node); |
| 119 | 119 | } |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | protected function resolveScalarMagicConstMethod() |
| 145 | 145 | { |
| 146 | 146 | if ($this->context instanceof \ReflectionMethod) { |
| 147 | - $fullName = $this->context->getDeclaringClass()->getName() . '::' . $this->context->getShortName(); |
|
| 147 | + $fullName = $this->context->getDeclaringClass()->getName().'::'.$this->context->getShortName(); |
|
| 148 | 148 | |
| 149 | 149 | return $fullName; |
| 150 | 150 | } |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $fileNamespace = new ReflectionFileNamespace($fileName, $namespaceName); |
| 239 | 239 | if ($fileNamespace->hasConstant($constantName)) { |
| 240 | 240 | $constantValue = $fileNamespace->getConstant($constantName); |
| 241 | - $constantName = $fileNamespace->getName() . '\\' . $constantName; |
|
| 241 | + $constantName = $fileNamespace->getName().'\\'.$constantName; |
|
| 242 | 242 | $isResolved = true; |
| 243 | 243 | } |
| 244 | 244 | } |