| Conditions | 4 |
| Paths | 8 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 23 | public function compile(Twig_Compiler $compiler) |
||
| 24 | { |
||
| 25 | $has_prio = $this->hasNode('prio'); |
||
| 26 | $prio = ($has_prio) ? $this->getNode('prio') : 0 ; |
||
| 27 | $compiler->addDebugInfo($this); |
||
| 28 | $compiler->write('$this->env->getExtension(\'zicht_framework_extra\')->getAnnotationRegistry()'); |
||
| 29 | |||
| 30 | if ($this->hasNode('name')) { |
||
| 31 | $compiler->raw('->addAnnotation(')->subcompile($this->getNode('name'))->raw(', '); |
||
| 32 | } else { |
||
| 33 | $compiler->raw('->addAnnotations('); |
||
| 34 | } |
||
| 35 | |||
| 36 | $compiler->subcompile($this->getNode('expr')); |
||
| 37 | |||
| 38 | if ($has_prio) { |
||
| 39 | $compiler->raw(', '); |
||
| 40 | $compiler->subcompile($prio); |
||
|
|
|||
| 41 | } |
||
| 42 | |||
| 43 | $compiler->write(');' . "\n"); |
||
| 44 | } |
||
| 46 |