Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
38 | 3 | public function compile(\Twig_Compiler $compiler) |
|
39 | { |
||
40 | 3 | $compiler->addDebugInfo($this) |
|
41 | 3 | ->write(self::CODE_FIX_CONTEXT) |
|
42 | 3 | ->write(self::CODE_INSTANCE.'->startAlignment(') |
|
43 | 3 | ->repr($this->alignment) |
|
44 | 3 | ->raw(');'.PHP_EOL) |
|
45 | 3 | ->write("ob_start();\n") |
|
46 | 3 | ->subcompile($this->getNode('body')) |
|
47 | 3 | ->write('$alignmentValue = trim(ob_get_clean());'.PHP_EOL) |
|
48 | 3 | ->write(self::CODE_INSTANCE.'->endAlignment($alignmentValue);'.PHP_EOL) |
|
49 | 3 | ->write('unset($alignmentValue);'.PHP_EOL); |
|
50 | 3 | } |
|
51 | |||
62 |