Completed
Pull Request — master (#189)
by Valentin
02:37
created
source/Spiral/Http/Routing/AbstractRoute.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function withPrefix(string $prefix): RouteInterface
144 144
     {
145 145
         $route = clone $this;
146
-        $route->prefix = rtrim($prefix, '/') . '/';
146
+        $route->prefix = rtrim($prefix, '/').'/';
147 147
 
148 148
         return $route;
149 149
     }
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         );
276 276
 
277 277
         //Uri with added prefix
278
-        $uri = new Uri(($this->withHost ? '' : $this->prefix) . trim($path, '/'));
278
+        $uri = new Uri(($this->withHost ? '' : $this->prefix).trim($path, '/'));
279 279
 
280 280
         return empty($query) ? $uri : $uri->withQuery(http_build_query($query));
281 281
     }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $template = preg_replace('/<(\w+):?.*?>/', '<\1>', $this->pattern);
397 397
 
398 398
         $this->compiled = [
399
-            'pattern'  => '/^' . strtr($template, $replaces) . '$/iu',
399
+            'pattern'  => '/^'.strtr($template, $replaces).'$/iu',
400 400
             'template' => stripslashes(str_replace('?', '', $template)),
401 401
             'options'  => array_fill_keys($options, null)
402 402
         ];
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
         $path = $request->getUri()->getPath();
415 415
 
416 416
         if (empty($path) || $path[0] !== '/') {
417
-            $path = '/' . $path;
417
+            $path = '/'.$path;
418 418
         }
419 419
 
420 420
         if ($this->withHost) {
421
-            $uri = $request->getUri()->getHost() . $path;
421
+            $uri = $request->getUri()->getHost().$path;
422 422
         } else {
423 423
             $uri = substr($path, strlen($this->prefix));
424 424
         }
Please login to merge, or discard this patch.
source/Spiral/Http/RESTfulCore.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,6 +67,6 @@
 block discarded – undo
67 67
     protected function defineAction(Request $request, array $parameters, string $action = null)
68 68
     {
69 69
         //methodAction [putPost, getPost]
70
-        return strtolower($request->getMethod()) . ucfirst($action);
70
+        return strtolower($request->getMethod()).ucfirst($action);
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.
source/Spiral/Core/DotenvEnvironment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
source/Spiral/Session/Http/SessionStarter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
source/Spiral/Debug/Configs/SnapshotConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
source/Spiral/Views/ViewLoader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
source/Spiral/Core/Core.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -131,18 +131,18 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
source/Spiral/Views/Engines/Stempler/StemplerCache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,9 +59,9 @@
 block discarded – undo
59 59
      */
60 60
     public function cacheFilename(ViewSource $context): string
61 61
     {
62
-        $hash = hash('md5', $context->getFilename() . '.' . $this->environment->getID());
62
+        $hash = hash('md5', $context->getFilename().'.'.$this->environment->getID());
63 63
 
64
-        return $this->environment->cacheDirectory() . $hash . '.php';
64
+        return $this->environment->cacheDirectory().$hash.'.php';
65 65
     }
66 66
 
67 67
     /**
Please login to merge, or discard this patch.