@@ -25,7 +25,7 @@ |
||
25 | 25 | /** |
26 | 26 | * Initializes reflection instance |
27 | 27 | * |
28 | - * @param string|object $argument Class name or instance of object |
|
28 | + * @param string $argument Class name or instance of object |
|
29 | 29 | * @param ClassLike $classLikeNode AST node for class |
30 | 30 | */ |
31 | 31 | public function __construct($argument, ClassLike $classLikeNode = null) |
@@ -11,7 +11,6 @@ |
||
11 | 11 | namespace Go\ParserReflection; |
12 | 12 | |
13 | 13 | use Go\ParserReflection\Traits\ReflectionClassLikeTrait; |
14 | -use PhpParser\Node\Name; |
|
15 | 14 | use PhpParser\Node\Stmt\ClassLike; |
16 | 15 | use ReflectionObject as InternalReflectionObject; |
17 | 16 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -24,8 +24,8 @@ |
||
24 | 24 | /** |
25 | 25 | * Initializes reflection instance for given AST-node |
26 | 26 | * |
27 | - * @param string|\Closure $functionName The name of the function to reflect or a closure. |
|
28 | - * @param Function_|null $functionNode Function node AST |
|
27 | + * @param string $functionName The name of the function to reflect or a closure. |
|
28 | + * @param Function_ $functionNode Function node AST |
|
29 | 29 | */ |
30 | 30 | public function __construct($functionName, Function_ $functionNode) |
31 | 31 | { |
@@ -111,7 +111,7 @@ |
||
111 | 111 | $this->getStartLine(), |
112 | 112 | $this->getEndLine(), |
113 | 113 | count($this->getParameters()), |
114 | - array_reduce($this->getParameters(), function ($str, ReflectionParameter $param) { |
|
114 | + array_reduce($this->getParameters(), function($str, ReflectionParameter $param) { |
|
115 | 115 | return $str . "\n " . $param; |
116 | 116 | }, '') |
117 | 117 | ); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -306,6 +306,7 @@ discard block |
||
306 | 306 | |
307 | 307 | /** |
308 | 308 | * {@inheritdoc} |
309 | + * @param string $name |
|
309 | 310 | */ |
310 | 311 | public function getMethod($name) |
311 | 312 | { |
@@ -499,6 +500,7 @@ discard block |
||
499 | 500 | |
500 | 501 | /** |
501 | 502 | * {@inheritdoc} |
503 | + * @param string $name |
|
502 | 504 | */ |
503 | 505 | public function hasMethod($name) |
504 | 506 | { |
@@ -529,6 +531,7 @@ discard block |
||
529 | 531 | |
530 | 532 | /** |
531 | 533 | * {@inheritDoc} |
534 | + * @param string $interfaceName |
|
532 | 535 | */ |
533 | 536 | public function implementsInterface($interfaceName) |
534 | 537 | { |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -133,14 +133,14 @@ 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 | 140 | $indent = "\n" . str_repeat(' ', $indentLevel); |
141 | 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 | 146 | $str .= "\n" . str_repeat(' ', $indentLevel); |
@@ -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->getName()); |
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()) { |
@@ -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 |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | foreach ($this->namespaceNode->stmts as $namespaceLevelNode) { |
288 | 288 | if ($namespaceLevelNode instanceof Class_) { |
289 | 289 | $classShortName = $namespaceLevelNode->name; |
290 | - $className = $namespaceName ? $namespaceName .'\\' . $classShortName : $classShortName; |
|
290 | + $className = $namespaceName ? $namespaceName . '\\' . $classShortName : $classShortName; |
|
291 | 291 | |
292 | 292 | $namespaceLevelNode->setAttribute('fileName', $this->fileName); |
293 | 293 | $classes[$className] = new ReflectionClass($className, $namespaceLevelNode); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | foreach ($this->namespaceNode->stmts as $namespaceLevelNode) { |
312 | 312 | if ($namespaceLevelNode instanceof Function_) { |
313 | 313 | $funcShortName = $namespaceLevelNode->name; |
314 | - $functionName = $namespaceName ? $namespaceName .'\\' . $funcShortName : $funcShortName; |
|
314 | + $functionName = $namespaceName ? $namespaceName . '\\' . $funcShortName : $funcShortName; |
|
315 | 315 | |
316 | 316 | $namespaceLevelNode->setAttribute('fileName', $this->fileName); |
317 | 317 | $functions[$funcShortName] = new ReflectionFunction($functionName, $namespaceLevelNode); |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | Property $propertyType = null, |
59 | 59 | PropertyProperty $propertyNode = null) |
60 | 60 | { |
61 | - $this->className = $className; |
|
61 | + $this->className = $className; |
|
62 | 62 | if (!$propertyType || !$propertyNode) { |
63 | 63 | list ($propertyType, $propertyNode) = ReflectionEngine::parseClassProperty($className, $propertyName); |
64 | 64 | } |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |
@@ -1,12 +1,12 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * Parser Reflection API |
|
4 | - * |
|
5 | - * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | - * |
|
7 | - * This source file is subject to the license that is bundled |
|
8 | - * with this source code in the file LICENSE. |
|
9 | - */ |
|
3 | + * Parser Reflection API |
|
4 | + * |
|
5 | + * @copyright Copyright 2015, Lisachenko Alexander <[email protected]> |
|
6 | + * |
|
7 | + * This source file is subject to the license that is bundled |
|
8 | + * with this source code in the file LICENSE. |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace Go\ParserReflection\ValueResolver; |
12 | 12 |