| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function compile(JsCompiler $compiler, \Twig_NodeInterface $node) |
||
| 27 | { |
||
| 28 | if (!$node instanceof \Twig_Node_Expression_Unary) { |
||
| 29 | throw new \RuntimeException( |
||
| 30 | sprintf( |
||
| 31 | '$node must be an instanceof of \Expression_Unary, but got "%s".', |
||
| 32 | get_class($node) |
||
| 33 | ) |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | $compiler->raw('('); |
||
| 38 | $this->operator($compiler, $node); |
||
| 39 | $compiler |
||
| 40 | ->subcompile($node->getNode('node')) |
||
| 41 | ->raw(')') |
||
| 42 | ; |
||
| 43 | } |
||
| 44 | |||
| 47 |