@@ -105,8 +105,8 @@ discard block |
||
105 | 105 | */ |
106 | 106 | private function getTemplateNames(string $templatesFolder, string $templatesFileMask): array |
107 | 107 | { |
108 | - return iterator_to_array(call_user_func(function () use ($templatesFolder, $templatesFileMask) { |
|
109 | - $flags = |
|
108 | + return iterator_to_array(call_user_func(function() use ($templatesFolder, $templatesFileMask) { |
|
109 | + $flags = |
|
110 | 110 | RecursiveDirectoryIterator::SKIP_DOTS | |
111 | 111 | RecursiveDirectoryIterator::FOLLOW_SYMLINKS | |
112 | 112 | RecursiveDirectoryIterator::CURRENT_AS_FILEINFO; |
@@ -114,8 +114,8 @@ discard block |
||
114 | 114 | foreach ($iterator as $found) { |
115 | 115 | /** @var SplFileInfo $found */ |
116 | 116 | if ($found->isFile() === true && fnmatch($templatesFileMask, $found->getFilename()) === true) { |
117 | - $fullFileName = $found->getPath() . DIRECTORY_SEPARATOR . $found->getFilename(); |
|
118 | - $templateName = str_replace($templatesFolder . DIRECTORY_SEPARATOR, '', $fullFileName); |
|
117 | + $fullFileName = $found->getPath().DIRECTORY_SEPARATOR.$found->getFilename(); |
|
118 | + $templateName = str_replace($templatesFolder.DIRECTORY_SEPARATOR, '', $fullFileName); |
|
119 | 119 | yield $templateName; |
120 | 120 | } |
121 | 121 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public static function configureContainer(LimoncelloContainerInterface $container): void |
37 | 37 | { |
38 | - $container[TemplatesInterface::class] = function (PsrContainerInterface $container): TemplatesInterface { |
|
38 | + $container[TemplatesInterface::class] = function(PsrContainerInterface $container): TemplatesInterface { |
|
39 | 39 | $settings = $container->get(SettingsProviderInterface::class)->get(C::class); |
40 | 40 | $templates = new TwigTemplates( |
41 | 41 | $settings[C::KEY_APP_ROOT_FOLDER], |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | }; |
49 | 49 | |
50 | 50 | $container[TemplatesCacheInterface::class] = |
51 | - function (PsrContainerInterface $container): TemplatesCacheInterface { |
|
51 | + function(PsrContainerInterface $container): TemplatesCacheInterface { |
|
52 | 52 | return $container->get(TemplatesInterface::class); |
53 | 53 | }; |
54 | 54 | } |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | (new self())->executeClear($inOut, $container); |
104 | 104 | break; |
105 | 105 | default: |
106 | - $inOut->writeError("Unsupported action `$action`." . PHP_EOL); |
|
106 | + $inOut->writeError("Unsupported action `$action`.".PHP_EOL); |
|
107 | 107 | break; |
108 | 108 | } |
109 | 109 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $fileSystem->isFolder($fileOrFolder) === false ?: $fileSystem->deleteFolderRecursive($fileOrFolder); |
126 | 126 | } |
127 | 127 | |
128 | - $inOut->writeInfo('Cache has been cleared.' . PHP_EOL); |
|
128 | + $inOut->writeInfo('Cache has been cleared.'.PHP_EOL); |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | foreach ($templates as $templateName) { |
148 | 148 | // it will write template to cache |
149 | 149 | $inOut->writeInfo( |
150 | - "Starting template caching for `$templateName`..." . PHP_EOL, |
|
150 | + "Starting template caching for `$templateName`...".PHP_EOL, |
|
151 | 151 | IoInterface::VERBOSITY_VERBOSE |
152 | 152 | ); |
153 | 153 | |
154 | 154 | $cache->cache($templateName); |
155 | 155 | |
156 | 156 | $inOut->writeInfo( |
157 | - "Template caching finished for `$templateName`." . PHP_EOL, |
|
157 | + "Template caching finished for `$templateName`.".PHP_EOL, |
|
158 | 158 | IoInterface::VERBOSITY_NORMAL |
159 | 159 | ); |
160 | 160 | } |