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