| Conditions | 1 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 29 | public function compile(\Twig_Compiler $compiler) |
|
| 16 | { |
||
| 17 | 29 | $compiler->addDebugInfo($this) |
|
| 18 | 29 | ->write("ob_start();\n") |
|
| 19 | 29 | ->write(self::CODE_INSTANCE.' = new '.PhpSpreadsheetWrapper::class.'($context, $this->env, ') |
|
| 20 | 29 | ->repr($this->attributes) |
|
| 21 | 29 | ->raw(');'.PHP_EOL) |
|
| 22 | 29 | ->write(self::CODE_INSTANCE.'->startDocument(') |
|
| 23 | 29 | ->subcompile($this->getNode('properties')) |
|
| 24 | 29 | ->raw(');'.PHP_EOL) |
|
| 25 | 29 | ->subcompile($this->getNode('body')) |
|
| 26 | 29 | ->addDebugInfo($this) |
|
| 27 | 29 | ->write("ob_end_clean();\n") |
|
| 28 | 29 | ->write(self::CODE_INSTANCE.'->endDocument();'.PHP_EOL) |
|
| 29 | 29 | ->write('unset('.self::CODE_INSTANCE.');'.PHP_EOL); |
|
| 30 | 29 | } |
|
| 31 | |||
| 40 |