| Conditions | 4 |
| Paths | 5 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | protected function doEnterNode(\Twig_Node $node, \Twig_Environment $env) |
||
| 31 | { |
||
| 32 | if ($node instanceof BaseNode) { |
||
| 33 | /* |
||
| 34 | * @var BaseNode $node |
||
| 35 | */ |
||
| 36 | try { |
||
| 37 | $this->checkAllowedParents($node); |
||
| 38 | } catch (\Twig_Error_Syntax $e) { |
||
| 39 | // reset path since throwing an error prevents doLeaveNode to be called |
||
| 40 | $this->path = []; |
||
| 41 | throw $e; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | $this->path[] = $node !== null ? get_class($node) : null; |
||
| 46 | |||
| 47 | return $node; |
||
| 48 | } |
||
| 49 | |||
| 89 |