@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | protected function loadInternal(array $mergedConfig, ContainerBuilder $container) |
21 | 21 | { |
22 | - $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
22 | + $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
23 | 23 | $loader->load('services.xml'); |
24 | 24 | |
25 | 25 | $container->setParameter('mewes_k_twig_excel.pre_calculate_formulas', $mergedConfig['pre_calculate_formulas']); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function getCacheDir() |
65 | 65 | { |
66 | - return __DIR__ . '/../../tmp/functional'; |
|
66 | + return __DIR__.'/../../tmp/functional'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function getLogDir() |
73 | 73 | { |
74 | - return __DIR__ . '/../../tmp/functional/logs'; |
|
74 | + return __DIR__.'/../../tmp/functional/logs'; |
|
75 | 75 | } |
76 | 76 | } |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | $source = static::$client->getResponse()->getContent(); |
46 | 46 | |
47 | 47 | // create source directory if necessary |
48 | - if (!file_exists(__DIR__ . static::$TEMP_PATH)) { |
|
49 | - mkdir(__DIR__ . static::$TEMP_PATH); |
|
48 | + if (!file_exists(__DIR__.static::$TEMP_PATH)) { |
|
49 | + mkdir(__DIR__.static::$TEMP_PATH); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | // save source |
53 | - file_put_contents(__DIR__ . static::$TEMP_PATH . 'simple' . '.' . $format, $source); |
|
53 | + file_put_contents(__DIR__.static::$TEMP_PATH.'simple'.'.'.$format, $source); |
|
54 | 54 | |
55 | 55 | // load source |
56 | 56 | switch ($format) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | throw new InvalidArgumentException(); |
68 | 68 | } |
69 | 69 | |
70 | - return $reader->load(__DIR__ . static::$TEMP_PATH . 'simple' . '.' . $format); |
|
70 | + return $reader->load(__DIR__.static::$TEMP_PATH.'simple'.'.'.$format); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | // |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | { |
87 | 87 | try { |
88 | 88 | $fs = new Filesystem(); |
89 | - $fs->remove(__DIR__ . static::$TEMP_PATH); |
|
90 | - } catch(\Exception $e) { |
|
89 | + $fs->remove(__DIR__.static::$TEMP_PATH); |
|
90 | + } catch (\Exception $e) { |
|
91 | 91 | if (!in_array(getenv('IGNORE_DELETE_EXCEPTIONS'), ['true', '1', 1, true], true)) { |
92 | 92 | throw $e; |
93 | 93 | } |
@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | if (in_array(getenv('DELETE_TEMP_FILES'), ['true', '1', 1, true], true)) { |
106 | 106 | try { |
107 | 107 | $fs = new Filesystem(); |
108 | - $fs->remove(__DIR__ . static::$TEMP_PATH); |
|
109 | - } catch(\Exception $e) { |
|
108 | + $fs->remove(__DIR__.static::$TEMP_PATH); |
|
109 | + } catch (\Exception $e) { |
|
110 | 110 | if (!in_array(getenv('IGNORE_DELETE_EXCEPTIONS'), ['true', '1', 1, true], true)) { |
111 | 111 | throw $e; |
112 | 112 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | public function defaultAction($templateName) |
22 | 22 | { |
23 | 23 | return $this->render( |
24 | - '@Test/Default/' . $templateName . '.twig', |
|
24 | + '@Test/Default/'.$templateName.'.twig', |
|
25 | 25 | [ |
26 | 26 | 'data' => [ |
27 | 27 | ['name' => 'Everette Grim', 'salary' => 5458.0], |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | { |
59 | 59 | $response = new Response( |
60 | 60 | $this->render( |
61 | - '@Test/Default/' . $templateName . '.twig', |
|
61 | + '@Test/Default/'.$templateName.'.twig', |
|
62 | 62 | [ |
63 | 63 | 'data' => [ |
64 | 64 | ['name' => 'Everette Grim', 'salary' => 5458.0], |
@@ -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 | /** |
@@ -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 | /** |