Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
13 | 23 | public function compile(\Twig_Compiler $compiler) |
|
14 | { |
||
15 | 23 | $compiler->addDebugInfo($this) |
|
16 | 23 | ->write(self::CODE_FIX_CONTEXT) |
|
17 | 23 | ->write(self::CODE_INSTANCE.'->setCellIndex(') |
|
18 | 23 | ->subcompile($this->getNode('index')) |
|
19 | 23 | ->raw(');'.PHP_EOL) |
|
20 | 23 | ->write("ob_start();\n") |
|
21 | 23 | ->subcompile($this->getNode('body')) |
|
22 | 23 | ->write('$cellValue = trim(ob_get_clean());'.PHP_EOL) |
|
23 | 23 | ->write('$cellProperties = ') |
|
24 | 23 | ->subcompile($this->getNode('properties')) |
|
25 | 23 | ->raw(';'.PHP_EOL) |
|
26 | 23 | ->write(self::CODE_INSTANCE.'->startCell($cellValue, $cellProperties);'.PHP_EOL) |
|
27 | 23 | ->write('unset($cellIndex, $cellValue, $cellProperties);'.PHP_EOL) |
|
28 | 23 | ->write(self::CODE_INSTANCE.'->endCell();'.PHP_EOL); |
|
29 | 23 | } |
|
30 | |||
41 |