@@ -111,7 +111,7 @@ |
||
| 111 | 111 | * |
| 112 | 112 | * @param string $channel |
| 113 | 113 | * |
| 114 | - * @return array |
|
| 114 | + * @return HandlerInterface[] |
|
| 115 | 115 | */ |
| 116 | 116 | protected function createHandlers(string $channel): array |
| 117 | 117 | { |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | */ |
| 212 | 212 | protected function loadDomain(string $domain) |
| 213 | 213 | { |
| 214 | - $data = $this->memory->loadData(Translator::MEMORY . '.' . $this->domainSection($domain)); |
|
| 214 | + $data = $this->memory->loadData(Translator::MEMORY.'.'.$this->domainSection($domain)); |
|
| 215 | 215 | |
| 216 | 216 | if (empty($data)) { |
| 217 | 217 | $data = []; |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | */ |
| 233 | 233 | protected function saveDomain(string $domain, array $data) |
| 234 | 234 | { |
| 235 | - $this->memory->saveData(Translator::MEMORY . '.' . $this->domainSection($domain), $data); |
|
| 235 | + $this->memory->saveData(Translator::MEMORY.'.'.$this->domainSection($domain), $data); |
|
| 236 | 236 | } |
| 237 | 237 | |
| 238 | 238 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @param string $filename Cache filename. |
| 54 | 54 | */ |
| 55 | - public function loadData(string $section, string &$filename = null) |
|
| 55 | + public function loadData(string $section, string & $filename = null) |
|
| 56 | 56 | { |
| 57 | 57 | $filename = $this->memoryFilename($section); |
| 58 | 58 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $filename = $this->memoryFilename($section); |
| 76 | 76 | |
| 77 | 77 | //We are packing data into plain php |
| 78 | - $data = '<?php return ' . var_export($data, true) . ';'; |
|
| 78 | + $data = '<?php return '.var_export($data, true).';'; |
|
| 79 | 79 | |
| 80 | 80 | //We need help to write file with directory creation |
| 81 | 81 | $this->files->write($filename, $data, FilesInterface::RUNTIME, true); |
@@ -93,6 +93,6 @@ discard block |
||
| 93 | 93 | $name = strtolower(str_replace(['/', '\\'], '-', $name)); |
| 94 | 94 | |
| 95 | 95 | //Runtime cache |
| 96 | - return $this->directory . $name . static::EXTENSION; |
|
| 96 | + return $this->directory.$name.static::EXTENSION; |
|
| 97 | 97 | } |
| 98 | 98 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | //Unique env file hash |
| 135 | 135 | $this->id = $this->files->md5($this->filename); |
| 136 | 136 | |
| 137 | - if (!empty($values = $this->memory->loadData(static::MEMORY . '.' . $this->id))) { |
|
| 137 | + if (!empty($values = $this->memory->loadData(static::MEMORY.'.'.$this->id))) { |
|
| 138 | 138 | //Restore from cache |
| 139 | 139 | $this->initEnvironment($values); |
| 140 | 140 | |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $this->parseValues($this->filename) |
| 147 | 147 | ); |
| 148 | 148 | |
| 149 | - $this->memory->saveData(static::MEMORY . '.' . $this->id, $values); |
|
| 149 | + $this->memory->saveData(static::MEMORY.'.'.$this->id, $values); |
|
| 150 | 150 | |
| 151 | 151 | return $this; |
| 152 | 152 | } |
@@ -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 | ); |