| Conditions | 5 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function enterNode(NodeInterface $node): ?NodeInterface |
||
| 32 | { |
||
| 33 | $newNode = null; |
||
| 34 | |||
| 35 | foreach ($this->visitors as $i => $visitor) { |
||
| 36 | if (!isset($this->_skipping[$i])) { |
||
| 37 | try { |
||
| 38 | $newNode = $visitor->enterNode($node); |
||
| 39 | } catch (VisitorBreak $break) { |
||
| 40 | $this->_skipping[$i] = $break; |
||
| 41 | continue; |
||
| 42 | } |
||
| 43 | |||
| 44 | if (null === $newNode) { |
||
| 45 | $this->_skipping[$i] = $node; |
||
| 46 | |||
| 47 | $newNode = $node; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | } |
||
| 51 | |||
| 52 | return $newNode; |
||
| 53 | } |
||
| 78 |