@@ -33,16 +33,16 @@ |
||
33 | 33 | $compiler->addDebugInfo($this) |
34 | 34 | ->write('$context[\'phpExcel\']->setCellIndex(') |
35 | 35 | ->subcompile($this->getNode('index')) |
36 | - ->raw(');' . PHP_EOL) |
|
36 | + ->raw(');'.PHP_EOL) |
|
37 | 37 | ->write("ob_start();\n") |
38 | 38 | ->subcompile($this->getNode('body')) |
39 | - ->write('$cellValue = trim(ob_get_clean());' . PHP_EOL) |
|
39 | + ->write('$cellValue = trim(ob_get_clean());'.PHP_EOL) |
|
40 | 40 | ->write('$cellProperties = ') |
41 | 41 | ->subcompile($this->getNode('properties')) |
42 | - ->raw(';' . PHP_EOL) |
|
43 | - ->write('$context[\'phpExcel\']->startCell($cellValue, $cellProperties);' . PHP_EOL) |
|
44 | - ->write('unset($cellIndex, $cellValue, $cellProperties);' . PHP_EOL) |
|
45 | - ->write('$context[\'phpExcel\']->endCell();' . PHP_EOL); |
|
42 | + ->raw(';'.PHP_EOL) |
|
43 | + ->write('$context[\'phpExcel\']->startCell($cellValue, $cellProperties);'.PHP_EOL) |
|
44 | + ->write('unset($cellIndex, $cellValue, $cellProperties);'.PHP_EOL) |
|
45 | + ->write('$context[\'phpExcel\']->endCell();'.PHP_EOL); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -28,12 +28,12 @@ |
||
28 | 28 | public function compile(Twig_Compiler $compiler) |
29 | 29 | { |
30 | 30 | $compiler->addDebugInfo($this) |
31 | - ->write('$context[\'phpExcel\']->startAlignment(\'center\');' . PHP_EOL) |
|
31 | + ->write('$context[\'phpExcel\']->startAlignment(\'center\');'.PHP_EOL) |
|
32 | 32 | ->write("ob_start();\n") |
33 | 33 | ->subcompile($this->getNode('body')) |
34 | - ->write('$centerValue = trim(ob_get_clean());' . PHP_EOL) |
|
35 | - ->write('$context[\'phpExcel\']->endAlignment($centerValue);' . PHP_EOL) |
|
36 | - ->write('unset($centerValue);' . PHP_EOL); |
|
34 | + ->write('$centerValue = trim(ob_get_clean());'.PHP_EOL) |
|
35 | + ->write('$context[\'phpExcel\']->endAlignment($centerValue);'.PHP_EOL) |
|
36 | + ->write('unset($centerValue);'.PHP_EOL); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -45,16 +45,16 @@ |
||
45 | 45 | $compiler->addDebugInfo($this) |
46 | 46 | ->write('$documentProperties = ') |
47 | 47 | ->subcompile($this->getNode('properties')) |
48 | - ->raw(';' . PHP_EOL) |
|
49 | - ->write('$context[\'phpExcel\'] = new MewesK\TwigExcelBundle\Wrapper\PhpExcelWrapper($context);' . PHP_EOL) |
|
50 | - ->write('$context[\'phpExcel\']->startDocument($documentProperties);' . PHP_EOL) |
|
51 | - ->write('unset($documentProperties);' . PHP_EOL) |
|
48 | + ->raw(';'.PHP_EOL) |
|
49 | + ->write('$context[\'phpExcel\'] = new MewesK\TwigExcelBundle\Wrapper\PhpExcelWrapper($context);'.PHP_EOL) |
|
50 | + ->write('$context[\'phpExcel\']->startDocument($documentProperties);'.PHP_EOL) |
|
51 | + ->write('unset($documentProperties);'.PHP_EOL) |
|
52 | 52 | ->subcompile($this->getNode('body')) |
53 | 53 | ->addDebugInfo($this) |
54 | - ->write('$context[\'phpExcel\']->endDocument(' . |
|
55 | - ($this->preCalculateFormulas ? 'true' : 'false') . ', ' . |
|
56 | - ($this->diskCachingDirectory ? '\'' . $this->diskCachingDirectory . '\'' : 'null') . ');' . PHP_EOL) |
|
57 | - ->write('unset($context[\'phpExcel\']);' . PHP_EOL); |
|
54 | + ->write('$context[\'phpExcel\']->endDocument('. |
|
55 | + ($this->preCalculateFormulas ? 'true' : 'false').', '. |
|
56 | + ($this->diskCachingDirectory ? '\''.$this->diskCachingDirectory.'\'' : 'null').');'.PHP_EOL) |
|
57 | + ->write('unset($context[\'phpExcel\']);'.PHP_EOL); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -32,13 +32,13 @@ |
||
32 | 32 | $compiler->addDebugInfo($this) |
33 | 33 | ->write('$drawingPath = ') |
34 | 34 | ->subcompile($this->getNode('path')) |
35 | - ->raw(';' . PHP_EOL) |
|
35 | + ->raw(';'.PHP_EOL) |
|
36 | 36 | ->write('$drawingProperties = ') |
37 | 37 | ->subcompile($this->getNode('properties')) |
38 | - ->raw(';' . PHP_EOL) |
|
39 | - ->write('$context[\'phpExcel\']->startDrawing($drawingPath, $drawingProperties);' . PHP_EOL) |
|
40 | - ->write('unset($drawingPath, $drawingProperties);' . PHP_EOL) |
|
41 | - ->write('$context[\'phpExcel\']->endDrawing();' . PHP_EOL); |
|
38 | + ->raw(';'.PHP_EOL) |
|
39 | + ->write('$context[\'phpExcel\']->startDrawing($drawingPath, $drawingProperties);'.PHP_EOL) |
|
40 | + ->write('unset($drawingPath, $drawingProperties);'.PHP_EOL) |
|
41 | + ->write('$context[\'phpExcel\']->endDrawing();'.PHP_EOL); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
@@ -33,16 +33,16 @@ |
||
33 | 33 | $compiler->addDebugInfo($this) |
34 | 34 | ->write('$footerType = ') |
35 | 35 | ->subcompile($this->getNode('type')) |
36 | - ->raw(';' . PHP_EOL) |
|
37 | - ->write('$footerType = $footerType ? $footerType : \'footer\';' . PHP_EOL) |
|
36 | + ->raw(';'.PHP_EOL) |
|
37 | + ->write('$footerType = $footerType ? $footerType : \'footer\';'.PHP_EOL) |
|
38 | 38 | ->write('$footerProperties = ') |
39 | 39 | ->subcompile($this->getNode('properties')) |
40 | - ->raw(';' . PHP_EOL) |
|
41 | - ->write('$context[\'phpExcel\']->startHeaderFooter($footerType, $footerProperties);' . PHP_EOL) |
|
42 | - ->write('unset($footerType, $footerProperties);' . PHP_EOL) |
|
40 | + ->raw(';'.PHP_EOL) |
|
41 | + ->write('$context[\'phpExcel\']->startHeaderFooter($footerType, $footerProperties);'.PHP_EOL) |
|
42 | + ->write('unset($footerType, $footerProperties);'.PHP_EOL) |
|
43 | 43 | ->subcompile($this->getNode('body')) |
44 | 44 | ->addDebugInfo($this) |
45 | - ->write('$context[\'phpExcel\']->endHeaderFooter();' . PHP_EOL); |
|
45 | + ->write('$context[\'phpExcel\']->endHeaderFooter();'.PHP_EOL); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -33,16 +33,16 @@ |
||
33 | 33 | $compiler->addDebugInfo($this) |
34 | 34 | ->write('$headerType = ') |
35 | 35 | ->subcompile($this->getNode('type')) |
36 | - ->raw(';' . PHP_EOL) |
|
37 | - ->write('$headerType = $headerType ? $headerType : \'header\';' . PHP_EOL) |
|
36 | + ->raw(';'.PHP_EOL) |
|
37 | + ->write('$headerType = $headerType ? $headerType : \'header\';'.PHP_EOL) |
|
38 | 38 | ->write('$headerProperties = ') |
39 | 39 | ->subcompile($this->getNode('properties')) |
40 | - ->raw(';' . PHP_EOL) |
|
41 | - ->write('$context[\'phpExcel\']->startHeaderFooter($headerType, $headerProperties);' . PHP_EOL) |
|
42 | - ->write('unset($headerType, $headerProperties);' . PHP_EOL) |
|
40 | + ->raw(';'.PHP_EOL) |
|
41 | + ->write('$context[\'phpExcel\']->startHeaderFooter($headerType, $headerProperties);'.PHP_EOL) |
|
42 | + ->write('unset($headerType, $headerProperties);'.PHP_EOL) |
|
43 | 43 | ->subcompile($this->getNode('body')) |
44 | 44 | ->addDebugInfo($this) |
45 | - ->write('$context[\'phpExcel\']->endHeaderFooter();' . PHP_EOL); |
|
45 | + ->write('$context[\'phpExcel\']->endHeaderFooter();'.PHP_EOL); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -28,12 +28,12 @@ |
||
28 | 28 | public function compile(Twig_Compiler $compiler) |
29 | 29 | { |
30 | 30 | $compiler->addDebugInfo($this) |
31 | - ->write('$context[\'phpExcel\']->startAlignment(\'left\');' . PHP_EOL) |
|
31 | + ->write('$context[\'phpExcel\']->startAlignment(\'left\');'.PHP_EOL) |
|
32 | 32 | ->write("ob_start();\n") |
33 | 33 | ->subcompile($this->getNode('body')) |
34 | - ->write('$leftValue = trim(ob_get_clean());' . PHP_EOL) |
|
35 | - ->write('$context[\'phpExcel\']->endAlignment($leftValue);' . PHP_EOL) |
|
36 | - ->write('unset($leftValue);' . PHP_EOL); |
|
34 | + ->write('$leftValue = trim(ob_get_clean());'.PHP_EOL) |
|
35 | + ->write('$context[\'phpExcel\']->endAlignment($leftValue);'.PHP_EOL) |
|
36 | + ->write('unset($leftValue);'.PHP_EOL); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -28,12 +28,12 @@ |
||
28 | 28 | public function compile(Twig_Compiler $compiler) |
29 | 29 | { |
30 | 30 | $compiler->addDebugInfo($this) |
31 | - ->write('$context[\'phpExcel\']->startAlignment(\'right\');' . PHP_EOL) |
|
31 | + ->write('$context[\'phpExcel\']->startAlignment(\'right\');'.PHP_EOL) |
|
32 | 32 | ->write("ob_start();\n") |
33 | 33 | ->subcompile($this->getNode('body')) |
34 | - ->write('$rightValue = trim(ob_get_clean());' . PHP_EOL) |
|
35 | - ->write('$context[\'phpExcel\']->endAlignment($rightValue);' . PHP_EOL) |
|
36 | - ->write('unset($rightValue);' . PHP_EOL); |
|
34 | + ->write('$rightValue = trim(ob_get_clean());'.PHP_EOL) |
|
35 | + ->write('$context[\'phpExcel\']->endAlignment($rightValue);'.PHP_EOL) |
|
36 | + ->write('unset($rightValue);'.PHP_EOL); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
@@ -32,12 +32,12 @@ |
||
32 | 32 | $compiler->addDebugInfo($this) |
33 | 33 | ->write('$context[\'phpExcel\']->setRowIndex(') |
34 | 34 | ->subcompile($this->getNode('index')) |
35 | - ->raw(');' . PHP_EOL) |
|
36 | - ->write('$context[\'phpExcel\']->startRow($context[\'phpExcel\']->getRowIndex());' . PHP_EOL) |
|
37 | - ->write('$context[\'phpExcel\']->setRowIndex(0);' . PHP_EOL) |
|
35 | + ->raw(');'.PHP_EOL) |
|
36 | + ->write('$context[\'phpExcel\']->startRow($context[\'phpExcel\']->getRowIndex());'.PHP_EOL) |
|
37 | + ->write('$context[\'phpExcel\']->setRowIndex(0);'.PHP_EOL) |
|
38 | 38 | ->subcompile($this->getNode('body')) |
39 | 39 | ->addDebugInfo($this) |
40 | - ->write('$context[\'phpExcel\']->endRow();' . PHP_EOL); |
|
40 | + ->write('$context[\'phpExcel\']->endRow();'.PHP_EOL); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |