| Conditions | 4 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 1 | public function enterNode(Node $node) |
|
| 28 | { |
||
| 29 | // There may be internal generators in closures, we do not need to look at them |
||
| 30 | 1 | if ($node instanceof Node\Expr\Closure) { |
|
| 31 | 1 | return NodeTraverser::DONT_TRAVERSE_CHILDREN; |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | if ($node instanceof Node\Expr\Yield_ || $node instanceof Node\Expr\YieldFrom) { |
|
| 35 | 1 | $this->isGenerator = true; |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | return null; |
|
| 39 | } |
||
| 40 | |||
| 51 |