@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | */ |
| 30 | 30 | public function registerContainerConfiguration(LoaderInterface $loader) |
| 31 | 31 | { |
| 32 | - $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); |
|
| 32 | + $loader->load($this->getRootDir() . '/config/config_' . $this->getEnvironment() . '.yml'); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | /** |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function getCacheDir() |
| 39 | 39 | { |
| 40 | - return $this->getRootDir().'/../../tmp/cache'; |
|
| 40 | + return $this->getRootDir() . '/../../tmp/cache'; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -45,6 +45,6 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function getLogDir() |
| 47 | 47 | { |
| 48 | - return $this->getRootDir().'/../../tmp/logs'; |
|
| 48 | + return $this->getRootDir() . '/../../tmp/logs'; |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | public static function setUpBeforeClass() |
| 39 | 39 | { |
| 40 | 40 | static::$fileSystem = new Filesystem(); |
| 41 | - static::$fileSystem->remove(__DIR__.static::$TEMP_PATH); |
|
| 41 | + static::$fileSystem->remove(__DIR__ . static::$TEMP_PATH); |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public static function tearDownAfterClass() |
| 50 | 50 | { |
| 51 | 51 | if (in_array(getenv('DELETE_TEMP_FILES'), ['true', '1', 1, true], true)) { |
| 52 | - static::$fileSystem->remove(__DIR__.static::$TEMP_PATH); |
|
| 52 | + static::$fileSystem->remove(__DIR__ . static::$TEMP_PATH); |
|
| 53 | 53 | } |
| 54 | 54 | } |
| 55 | 55 | |
@@ -93,8 +93,8 @@ discard block |
||
| 93 | 93 | $source = static::$client->getResponse()->getContent(); |
| 94 | 94 | |
| 95 | 95 | // create paths |
| 96 | - $tempDirPath = __DIR__.static::$TEMP_PATH; |
|
| 97 | - $tempFilePath = $tempDirPath.'simple'.'.'.$format; |
|
| 96 | + $tempDirPath = __DIR__ . static::$TEMP_PATH; |
|
| 97 | + $tempFilePath = $tempDirPath . 'simple' . '.' . $format; |
|
| 98 | 98 | |
| 99 | 99 | // save source |
| 100 | 100 | static::$fileSystem->dumpFile($tempFilePath, $source); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | protected function loadInternal(array $mergedConfig, ContainerBuilder $container) |
| 22 | 22 | { |
| 23 | - $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
|
| 23 | + $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 24 | 24 | $loader->load('services.yml'); |
| 25 | 25 | |
| 26 | 26 | $container->setParameter('mewes_k_twig_spreadsheet.pre_calculate_formulas', $mergedConfig['pre_calculate_formulas']); |
@@ -18,17 +18,17 @@ |
||
| 18 | 18 | ->write("ob_start();\n") |
| 19 | 19 | ->write('$documentProperties = ') |
| 20 | 20 | ->subcompile($this->getNode('properties')) |
| 21 | - ->raw(';'.PHP_EOL) |
|
| 22 | - ->write(self::CODE_INSTANCE.' = new '.PhpSpreadsheetWrapper::class.'($context, $this->env);'.PHP_EOL) |
|
| 23 | - ->write(self::CODE_INSTANCE.'->startDocument($documentProperties);'.PHP_EOL) |
|
| 24 | - ->write('unset($documentProperties);'.PHP_EOL) |
|
| 21 | + ->raw(';' . PHP_EOL) |
|
| 22 | + ->write(self::CODE_INSTANCE . ' = new ' . PhpSpreadsheetWrapper::class . '($context, $this->env);' . PHP_EOL) |
|
| 23 | + ->write(self::CODE_INSTANCE . '->startDocument($documentProperties);' . PHP_EOL) |
|
| 24 | + ->write('unset($documentProperties);' . PHP_EOL) |
|
| 25 | 25 | ->subcompile($this->getNode('body')) |
| 26 | 26 | ->addDebugInfo($this) |
| 27 | 27 | ->write("ob_end_clean();\n") |
| 28 | - ->write(self::CODE_INSTANCE.'->endDocument('. |
|
| 29 | - ($this->getAttribute('preCalculateFormulas') ? 'true' : 'false').', '. |
|
| 30 | - ($this->getAttribute('diskCachingDirectory') ? '\''.$this->getAttribute('diskCachingDirectory').'\'' : 'null').');'.PHP_EOL) |
|
| 31 | - ->write('unset('.self::CODE_INSTANCE.');'.PHP_EOL); |
|
| 28 | + ->write(self::CODE_INSTANCE . '->endDocument(' . |
|
| 29 | + ($this->getAttribute('preCalculateFormulas') ? 'true' : 'false') . ', ' . |
|
| 30 | + ($this->getAttribute('diskCachingDirectory') ? '\'' . $this->getAttribute('diskCachingDirectory') . '\'' : 'null') . ');' . PHP_EOL) |
|
| 31 | + ->write('unset(' . self::CODE_INSTANCE . ');' . PHP_EOL); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |