@@ -139,17 +139,17 @@ discard block |
||
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | - $buildString = function (array $items, $indentLevel = 4) { |
|
| 142 | + $buildString = function(array $items, $indentLevel = 4) { |
|
| 143 | 143 | if (!count($items)) { |
| 144 | 144 | return ''; |
| 145 | 145 | } |
| 146 | - $indent = "\n" . str_repeat(' ', $indentLevel); |
|
| 147 | - return $indent . implode($indent, explode("\n", implode("\n", $items))); |
|
| 146 | + $indent = "\n".str_repeat(' ', $indentLevel); |
|
| 147 | + return $indent.implode($indent, explode("\n", implode("\n", $items))); |
|
| 148 | 148 | }; |
| 149 | - $buildConstants = function (array $items, $indentLevel = 4) { |
|
| 149 | + $buildConstants = function(array $items, $indentLevel = 4) { |
|
| 150 | 150 | $str = ''; |
| 151 | 151 | foreach ($items as $name => $value) { |
| 152 | - $str .= "\n" . str_repeat(' ', $indentLevel); |
|
| 152 | + $str .= "\n".str_repeat(' ', $indentLevel); |
|
| 153 | 153 | $str .= sprintf( |
| 154 | 154 | 'Constant [ %s %s ] { %s }', |
| 155 | 155 | gettype($value), |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | ($isObject ? 'Object of class' : 'Class'), |
| 174 | 174 | $modifiers, |
| 175 | 175 | $this->getName(), |
| 176 | - false !== $parentClass ? (' extends ' . $parentClass->getName()) : '', |
|
| 177 | - $interfaceNames ? (' implements ' . implode(', ', $interfaceNames)) : '', |
|
| 176 | + false !== $parentClass ? (' extends '.$parentClass->getName()) : '', |
|
| 177 | + $interfaceNames ? (' implements '.implode(', ', $interfaceNames)) : '', |
|
| 178 | 178 | $this->getFileName(), |
| 179 | 179 | $this->getStartLine(), |
| 180 | 180 | $this->getEndLine(), |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | public function getConstants() |
| 215 | 215 | { |
| 216 | 216 | if (!isset($this->constants)) { |
| 217 | - $this->constants = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) { |
|
| 217 | + $this->constants = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) { |
|
| 218 | 218 | $result += $instance->getConstants(); |
| 219 | 219 | }); |
| 220 | 220 | $this->collectSelfConstants(); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $staticOrder = [true, false]; |
| 252 | 252 | foreach ($staticOrder as $shouldBeStatic) { |
| 253 | 253 | foreach ($properties as $property) { |
| 254 | - $isStaticProperty = $property->isStatic(); |
|
| 254 | + $isStaticProperty = $property->isStatic(); |
|
| 255 | 255 | if ($shouldBeStatic !== $isStaticProperty) { |
| 256 | 256 | continue; |
| 257 | 257 | } |
@@ -315,7 +315,7 @@ discard block |
||
| 315 | 315 | public function getInterfaces() |
| 316 | 316 | { |
| 317 | 317 | if (!isset($this->interfaceClasses)) { |
| 318 | - $this->interfaceClasses = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance) { |
|
| 318 | + $this->interfaceClasses = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance) { |
|
| 319 | 319 | if ($instance->isInterface()) { |
| 320 | 320 | $result[$instance->name] = $instance; |
| 321 | 321 | } |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | { |
| 354 | 354 | if (!isset($this->methods)) { |
| 355 | 355 | $directMethods = ReflectionMethod::collectFromClassNode($this->classLikeNode, $this); |
| 356 | - $parentMethods = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 356 | + $parentMethods = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 357 | 357 | $reflectionMethods = []; |
| 358 | 358 | foreach ($instance->getMethods() as $reflectionMethod) { |
| 359 | 359 | if (!$isParent || !$reflectionMethod->isPrivate()) { |
@@ -423,9 +423,9 @@ discard block |
||
| 423 | 423 | */ |
| 424 | 424 | public function getName() |
| 425 | 425 | { |
| 426 | - $namespaceName = $this->namespaceName ? $this->namespaceName . '\\' : ''; |
|
| 426 | + $namespaceName = $this->namespaceName ? $this->namespaceName.'\\' : ''; |
|
| 427 | 427 | |
| 428 | - return $namespaceName . $this->getShortName(); |
|
| 428 | + return $namespaceName.$this->getShortName(); |
|
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | /** |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | { |
| 470 | 470 | if (!isset($this->properties)) { |
| 471 | 471 | $directProperties = ReflectionProperty::collectFromClassNode($this->classLikeNode, $this->getName()); |
| 472 | - $parentProperties = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 472 | + $parentProperties = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 473 | 473 | $reflectionProperties = []; |
| 474 | 474 | foreach ($instance->getProperties() as $reflectionProperty) { |
| 475 | 475 | if (!$isParent || !$reflectionProperty->isPrivate()) { |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | { |
| 537 | 537 | if (!isset($this->classConstants)) { |
| 538 | 538 | $directClassConstants = ReflectionClassConstant::collectFromClassNode($this->classLikeNode, $this->getName()); |
| 539 | - $parentClassConstants = $this->recursiveCollect(function (array &$result, \ReflectionClass $instance, $isParent) { |
|
| 539 | + $parentClassConstants = $this->recursiveCollect(function(array &$result, \ReflectionClass $instance, $isParent) { |
|
| 540 | 540 | $reflectionClassConstants = []; |
| 541 | 541 | foreach ($instance->getReflectionConstants() as $reflectionClassConstant) { |
| 542 | 542 | if (!$isParent || !$reflectionClassConstant->isPrivate()) { |
@@ -588,7 +588,7 @@ discard block |
||
| 588 | 588 | break; |
| 589 | 589 | } |
| 590 | 590 | } |
| 591 | - $aliases[$adaptation->newName] = $traitName . '::'. $methodName; |
|
| 591 | + $aliases[$adaptation->newName] = $traitName.'::'.$methodName; |
|
| 592 | 592 | } |
| 593 | 593 | } |
| 594 | 594 | |