@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | /** |
46 | 46 | * @param array $nodes |
47 | - * @param array|NodeVisitor[] $visitors |
|
47 | + * @param NodeVisitor[] $visitors |
|
48 | 48 | * @return array |
49 | 49 | */ |
50 | 50 | public function traverseArray(array $nodes, array $visitors) { |
@@ -101,6 +101,9 @@ discard block |
||
101 | 101 | /** @var Traverser */ |
102 | 102 | private $traverser; |
103 | 103 | |
104 | + /** |
|
105 | + * @param \Closure $stopCondition |
|
106 | + */ |
|
104 | 107 | public function __construct($cloneNodes = false, $stopCondition = null) |
105 | 108 | { |
106 | 109 | parent::__construct(); |
@@ -123,6 +126,9 @@ discard block |
||
123 | 126 | /** @var Traverser */ |
124 | 127 | private $traverser; |
125 | 128 | |
129 | + /** |
|
130 | + * @param \Closure $stopCondition |
|
131 | + */ |
|
126 | 132 | public function __construct($cloneNodes = false, $stopCondition = null) |
127 | 133 | { |
128 | 134 | parent::__construct(); |
@@ -28,9 +28,9 @@ |
||
28 | 28 | |
29 | 29 | public function __construct(Mother $traverser, $stopCondition = null) |
30 | 30 | { |
31 | - if(null === $stopCondition) { |
|
31 | + if (null === $stopCondition) { |
|
32 | 32 | $stopCondition = function($node) { |
33 | - if($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) { |
|
33 | + if ($node instanceof Node\Stmt\Class_ || $node instanceof Node\Stmt\Interface_) { |
|
34 | 34 | return false; |
35 | 35 | } |
36 | 36 |
@@ -81,13 +81,13 @@ |
||
81 | 81 | */ |
82 | 82 | public function detects($node) |
83 | 83 | { |
84 | - if (! $node instanceof ClassMethod) { |
|
84 | + if (!$node instanceof ClassMethod) { |
|
85 | 85 | return null; |
86 | 86 | } |
87 | 87 | |
88 | 88 | // build a fingerprint of the given method |
89 | 89 | $fingerprintOfMethod = []; |
90 | - iterate_over_node($node, function ($node) use (&$fingerprintOfMethod) { |
|
90 | + iterate_over_node($node, function($node) use (&$fingerprintOfMethod) { |
|
91 | 91 | |
92 | 92 | // avoid identifier (php-parser:^4) |
93 | 93 | if ($node instanceof Identifier) { |