@@ -40,7 +40,7 @@ |
||
40 | 40 | ); |
41 | 41 | } |
42 | 42 | |
43 | - $benchmark = $this->benchmark('callAction', $controller . '::' . ($action ?? '~default~')); |
|
43 | + $benchmark = $this->benchmark('callAction', $controller.'::'.($action ?? '~default~')); |
|
44 | 44 | |
45 | 45 | //Making sure that all static functionality works well |
46 | 46 | $iocScope = self::staticContainer($this->container); |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | * Default directories pattern, you can overwrite any directory you want in index file. |
131 | 131 | */ |
132 | 132 | $this->directories = $directories + [ |
133 | - 'framework' => dirname(__DIR__) . '/', |
|
134 | - 'public' => $directories['root'] . 'webroot/', |
|
135 | - 'config' => $directories['application'] . 'config/', |
|
136 | - 'views' => $directories['application'] . 'views/', |
|
137 | - 'runtime' => $directories['application'] . 'runtime/', |
|
138 | - 'cache' => $directories['application'] . 'runtime/cache/', |
|
139 | - 'resources' => $directories['application'] . 'resources/', |
|
140 | - 'locales' => $directories['application'] . 'resources/locales/' |
|
133 | + 'framework' => dirname(__DIR__).'/', |
|
134 | + 'public' => $directories['root'].'webroot/', |
|
135 | + 'config' => $directories['application'].'config/', |
|
136 | + 'views' => $directories['application'].'views/', |
|
137 | + 'runtime' => $directories['application'].'runtime/', |
|
138 | + 'cache' => $directories['application'].'runtime/cache/', |
|
139 | + 'resources' => $directories['application'].'resources/', |
|
140 | + 'locales' => $directories['application'].'resources/locales/' |
|
141 | 141 | ]; |
142 | 142 | |
143 | 143 | //Every application needs timezone to be set, by default we are using UTC |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function setDirectory(string $alias, string $path): DirectoriesInterface |
198 | 198 | { |
199 | - $this->directories[$alias] = rtrim($path, '/\\') . '/'; |
|
199 | + $this->directories[$alias] = rtrim($path, '/\\').'/'; |
|
200 | 200 | |
201 | 201 | return $this; |
202 | 202 | } |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | * Default spiral environment is based on .env file. |
449 | 449 | */ |
450 | 450 | $environment = new Environment( |
451 | - $core->directory('root') . '.env', |
|
451 | + $core->directory('root').'.env', |
|
452 | 452 | $container->get(FilesInterface::class), |
453 | 453 | $core->memory |
454 | 454 | ); |
@@ -209,7 +209,7 @@ |
||
209 | 209 | * @param \Closure $closure |
210 | 210 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
211 | 211 | * |
212 | - * @return mixed |
|
212 | + * @return OutputInterface |
|
213 | 213 | */ |
214 | 214 | private function runScoped(\Closure $closure, OutputInterface $output) |
215 | 215 | { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | //Let's keep output reference to render exceptions |
103 | 103 | $this->output = $output ?? new ConsoleOutput(); |
104 | 104 | |
105 | - $this->runScoped(function () use ($input) { |
|
105 | + $this->runScoped(function() use ($input) { |
|
106 | 106 | $this->consoleApplication()->run($input, $this->output); |
107 | 107 | }, $this->output); |
108 | 108 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | |
132 | 132 | $output = $output ?? new BufferedOutput(); |
133 | 133 | |
134 | - $code = $this->runScoped(function () use ($input, $output, $command) { |
|
134 | + $code = $this->runScoped(function() use ($input, $output, $command) { |
|
135 | 135 | $this->consoleApplication()->find($command)->run($input, $output); |
136 | 136 | }, $output); |
137 | 137 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | */ |
77 | 77 | public function cacheDirectory(): string |
78 | 78 | { |
79 | - return rtrim($this->config['cache']['directory'], '/') . '/'; |
|
79 | + return rtrim($this->config['cache']['directory'], '/').'/'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -194,7 +194,7 @@ |
||
194 | 194 | |
195 | 195 | $benchmark = $this->benchmark( |
196 | 196 | 'process', |
197 | - get_class($processor) . '-{' . $source->getName() |
|
197 | + get_class($processor).'-{'.$source->getName() |
|
198 | 198 | ); |
199 | 199 | |
200 | 200 | $source->getCode(); |
@@ -58,9 +58,9 @@ |
||
58 | 58 | */ |
59 | 59 | public function cacheFilename(string $path): string |
60 | 60 | { |
61 | - $hash = hash('md5', $path . '.' . $this->environment->getID()); |
|
61 | + $hash = hash('md5', $path.'.'.$this->environment->getID()); |
|
62 | 62 | |
63 | - return $this->environment->cacheDirectory() . $hash . '.php'; |
|
63 | + return $this->environment->cacheDirectory().$hash.'.php'; |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
@@ -154,10 +154,10 @@ discard block |
||
154 | 154 | } |
155 | 155 | |
156 | 156 | foreach ($this->namespaces[$namespace] as $directory) { |
157 | - if ($this->files->exists($directory . $filename)) { |
|
157 | + if ($this->files->exists($directory.$filename)) { |
|
158 | 158 | |
159 | 159 | $this->cache[$path] = [ |
160 | - $directory . $filename, |
|
160 | + $directory.$filename, |
|
161 | 161 | $namespace, |
162 | 162 | $this->resolveName($filename) |
163 | 163 | ]; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | if (strpos($filename, '.') === false && !empty($this->extension)) { |
185 | 185 | //Forcing default extension |
186 | - $filename .= '.' . $this->extension; |
|
186 | + $filename .= '.'.$this->extension; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | if (strpos($filename, ViewsInterface::NS_SEPARATOR) !== false) { |
@@ -67,7 +67,7 @@ |
||
67 | 67 | $source = $this->parent->getSource($path); |
68 | 68 | |
69 | 69 | foreach ($this->modifiers as $modifier) { |
70 | - $benchmark = $this->benchmark('process', $path . '@' . get_class($modifier)); |
|
70 | + $benchmark = $this->benchmark('process', $path.'@'.get_class($modifier)); |
|
71 | 71 | try { |
72 | 72 | $source = $source->withCode( |
73 | 73 | $modifier->modify($this->environment, $source, $source->getCode()) |
@@ -57,14 +57,14 @@ |
||
57 | 57 | |
58 | 58 | //Translator options must automatically route this view name to specific domain |
59 | 59 | $domain = $this->translator->resolveDomain( |
60 | - $this->options['prefix'] . str_replace(['/', '\\'], '-', $bundle) |
|
60 | + $this->options['prefix'].str_replace(['/', '\\'], '-', $bundle) |
|
61 | 61 | ); |
62 | 62 | |
63 | 63 | //We are not forcing locale for now |
64 | 64 | |
65 | 65 | return preg_replace_callback( |
66 | 66 | $this->options['pattern'], |
67 | - function ($matches) use ($domain) { |
|
67 | + function($matches) use ($domain) { |
|
68 | 68 | return $this->translator->trans($matches[1], [], $domain); |
69 | 69 | }, |
70 | 70 | $code |