| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function compile(JsCompiler $compiler, \Twig_NodeInterface $node) |
||
| 32 | { |
||
| 33 | if (!$node instanceof \Twig_Node_Print) { |
||
| 34 | throw new \RuntimeException( |
||
| 35 | sprintf( |
||
| 36 | '$node must be an instanceof of \Print, but got "%s".', |
||
| 37 | get_class($node) |
||
| 38 | ) |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | $compiler |
||
| 43 | ->addDebugInfo($node) |
||
| 44 | ->write('sb.append(') |
||
| 45 | ->subcompile($node->getNode('expr')) |
||
| 46 | ->raw(");\n") |
||
| 47 | ; |
||
| 48 | } |
||
| 49 | } |
||
| 50 |