@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | if ( |
87 | 87 | !empty($this->memory) |
88 | - && !empty($values = $this->memory->loadData(static::MEMORY . '.' . $this->id)) |
|
88 | + && !empty($values = $this->memory->loadData(static::MEMORY.'.'.$this->id)) |
|
89 | 89 | ) { |
90 | 90 | //Restore from cache |
91 | 91 | $this->initEnvironment($values); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $this->initEnvironment($values); |
99 | 99 | |
100 | 100 | if (!empty($this->memory)) { |
101 | - $this->memory->saveData(static::MEMORY . '.' . $this->id, $values); |
|
101 | + $this->memory->saveData(static::MEMORY.'.'.$this->id, $values); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 |
@@ -167,7 +167,7 @@ |
||
167 | 167 | $signature = ''; |
168 | 168 | |
169 | 169 | foreach ($this->config->signHeaders() as $header) { |
170 | - $signature .= $request->getHeaderLine($header) . ';'; |
|
170 | + $signature .= $request->getHeaderLine($header).';'; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | return hash('sha256', $signature); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | */ |
64 | 64 | public function reportingDirectory(): string |
65 | 65 | { |
66 | - return rtrim($this->config['reporting']['directory'], '/') . '/'; |
|
66 | + return rtrim($this->config['reporting']['directory'], '/').'/'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -91,6 +91,6 @@ discard block |
||
91 | 91 | 'name' => $name |
92 | 92 | ]); |
93 | 93 | |
94 | - return $this->reportingDirectory() . $filename; |
|
94 | + return $this->reportingDirectory().$filename; |
|
95 | 95 | } |
96 | 96 | } |
97 | 97 | \ No newline at end of file |
@@ -103,11 +103,11 @@ discard block |
||
103 | 103 | |
104 | 104 | foreach ($this->namespaces[$namespace] as $directory) { |
105 | 105 | //Seeking for view filename |
106 | - if ($this->files->exists($directory . $filename)) { |
|
106 | + if ($this->files->exists($directory.$filename)) { |
|
107 | 107 | |
108 | 108 | //Found view context |
109 | 109 | $this->sourceCache[$path] = new ViewSource( |
110 | - $directory . $filename, |
|
110 | + $directory.$filename, |
|
111 | 111 | $this->fetchName($filename), |
112 | 112 | $namespace |
113 | 113 | ); |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | if (strpos($filename, '.') === false && !empty($this->extension)) { |
157 | 157 | //Forcing default extension |
158 | - $filename .= '.' . $this->extension; |
|
158 | + $filename .= '.'.$this->extension; |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | if (strpos($filename, ViewsInterface::NS_SEPARATOR) !== false) { |
@@ -131,18 +131,18 @@ discard block |
||
131 | 131 | * Default directories pattern, you can overwrite any directory you want in index file. |
132 | 132 | */ |
133 | 133 | $this->directories = $directories + [ |
134 | - 'framework' => dirname(__DIR__) . '/', |
|
135 | - 'public' => $directories['root'] . 'webroot/', |
|
136 | - 'config' => $directories['application'] . 'config/', |
|
137 | - 'views' => $directories['application'] . 'views/', |
|
138 | - 'runtime' => $directories['application'] . 'runtime/', |
|
139 | - 'resources' => $directories['application'] . 'resources/', |
|
140 | - 'locales' => $directories['application'] . 'resources/locales/' |
|
134 | + 'framework' => dirname(__DIR__).'/', |
|
135 | + 'public' => $directories['root'].'webroot/', |
|
136 | + 'config' => $directories['application'].'config/', |
|
137 | + 'views' => $directories['application'].'views/', |
|
138 | + 'runtime' => $directories['application'].'runtime/', |
|
139 | + 'resources' => $directories['application'].'resources/', |
|
140 | + 'locales' => $directories['application'].'resources/locales/' |
|
141 | 141 | ]; |
142 | 142 | |
143 | 143 | //Default cache directory |
144 | - if(!isset($this->directories['cache'])) { |
|
145 | - $this->directories['cache'] = $this->directories['runtime'] . 'cache/'; |
|
144 | + if (!isset($this->directories['cache'])) { |
|
145 | + $this->directories['cache'] = $this->directories['runtime'].'cache/'; |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | //Every application needs timezone to be set, by default we are using UTC |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | */ |
202 | 202 | public function setDirectory(string $alias, string $path): DirectoriesInterface |
203 | 203 | { |
204 | - $this->directories[$alias] = rtrim($path, '/\\') . '/'; |
|
204 | + $this->directories[$alias] = rtrim($path, '/\\').'/'; |
|
205 | 205 | |
206 | 206 | return $this; |
207 | 207 | } |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | //Application environment (by default - dotenv extension, applied to all env() functions!) |
458 | 458 | if (empty($environment)) { |
459 | 459 | $environment = new DotenvEnvironment( |
460 | - $core->directory('root') . '.env', |
|
460 | + $core->directory('root').'.env', |
|
461 | 461 | $core->memory |
462 | 462 | ); |
463 | 463 | } |
@@ -60,10 +60,10 @@ |
||
60 | 60 | */ |
61 | 61 | public function cacheFilename(ViewSource $context): string |
62 | 62 | { |
63 | - $hash = hash('md5', $context->getFilename() . '.' . $this->environment->getID()); |
|
63 | + $hash = hash('md5', $context->getFilename().'.'.$this->environment->getID()); |
|
64 | 64 | |
65 | - return $this->environment->cacheDirectory() . |
|
66 | - $this->getPrefix($context->getName(), $context->getNamespace()) . '-' . $hash . '.php'; |
|
65 | + return $this->environment->cacheDirectory(). |
|
66 | + $this->getPrefix($context->getName(), $context->getNamespace()).'-'.$hash.'.php'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public function generateKey($name, $className) |
44 | 44 | { |
45 | 45 | $prefix = $this->getPrefix($name); |
46 | - $hash = hash('md5', $className . '.' . $this->environment->getID()); |
|
46 | + $hash = hash('md5', $className.'.'.$this->environment->getID()); |
|
47 | 47 | |
48 | 48 | return "{$this->environment->cacheDirectory()}/{$prefix}-{$hash}.php"; |
49 | 49 | } |
@@ -23,9 +23,9 @@ |
||
23 | 23 | */ |
24 | 24 | protected function getPrefix($name, $namespace = 'default') |
25 | 25 | { |
26 | - $prefix = $namespace . ViewManager::NS_SEPARATOR . $name; |
|
27 | - $prefix = preg_replace('/([^A-Za-z0-9]|-)+/', '-', $prefix) . '-' . |
|
28 | - hash('md5', $name . ViewManager::NS_SEPARATOR . $namespace); |
|
26 | + $prefix = $namespace.ViewManager::NS_SEPARATOR.$name; |
|
27 | + $prefix = preg_replace('/([^A-Za-z0-9]|-)+/', '-', $prefix).'-'. |
|
28 | + hash('md5', $name.ViewManager::NS_SEPARATOR.$namespace); |
|
29 | 29 | |
30 | 30 | return $prefix; |
31 | 31 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | if (empty($path)) { |
162 | 162 | return '/'; |
163 | 163 | } elseif ($path[0] !== '/') { |
164 | - return '/' . $path; |
|
164 | + return '/'.$path; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | return $path; |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | $input = clone $this; |
393 | 393 | |
394 | 394 | if ($add) { |
395 | - $input->prefix .= '.' . $prefix; |
|
395 | + $input->prefix .= '.'.$prefix; |
|
396 | 396 | $input->prefix = trim($input->prefix, '.'); |
397 | 397 | } else { |
398 | 398 | $input->prefix = $prefix; |