Completed
Branch 09branch (d4e496)
by Anton
05:05
created
source/Spiral/Core/ConfigFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@
 block discarded – undo
130 130
      */
131 131
     protected function configFilename($config)
132 132
     {
133
-        return $this->directory . $config . static::EXTENSION;
133
+        return $this->directory.$config.static::EXTENSION;
134 134
     }
135 135
 
136 136
     /**
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
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
          * Default directories pattern, you can overwrite any directory you want in index file.
140 140
          */
141 141
         $this->directories = $directories + [
142
-                'framework' => dirname(__DIR__) . '/',
143
-                'public'    => $directories['root'] . 'webroot/',
144
-                'config'    => $directories['application'] . 'config/',
145
-                'views'     => $directories['application'] . 'views/',
146
-                'runtime'   => $directories['application'] . 'runtime/',
147
-                'cache'     => $directories['application'] . 'runtime/cache/',
148
-                'resources' => $directories['application'] . 'resources/',
149
-                'locales'   => $directories['application'] . 'resources/locales/'
142
+                'framework' => dirname(__DIR__).'/',
143
+                'public'    => $directories['root'].'webroot/',
144
+                'config'    => $directories['application'].'config/',
145
+                'views'     => $directories['application'].'views/',
146
+                'runtime'   => $directories['application'].'runtime/',
147
+                'cache'     => $directories['application'].'runtime/cache/',
148
+                'resources' => $directories['application'].'resources/',
149
+                'locales'   => $directories['application'].'resources/locales/'
150 150
             ];
151 151
 
152 152
         //Every application needs timezone to be set, by default we are using UTC
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function setDirectory(string $alias, string $path): DirectoriesInterface
207 207
     {
208
-        $this->directories[$alias] = rtrim($path, '/\\') . '/';
208
+        $this->directories[$alias] = rtrim($path, '/\\').'/';
209 209
 
210 210
         return $this;
211 211
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             );
286 286
         }
287 287
 
288
-        $benchmark = $this->benchmark('callAction', $controller . '::' . ($action ?? '~default~'));
288
+        $benchmark = $this->benchmark('callAction', $controller.'::'.($action ?? '~default~'));
289 289
 
290 290
         //Making sure that all static functionality works well
291 291
         $iocScope = self::staticContainer($this->container);
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
         //Setting environment (by default - dotenv extension)
509 509
         if (empty($environment)) {
510 510
             $environment = new Environment(
511
-                $core->directory('root') . '.env',
511
+                $core->directory('root').'.env',
512 512
                 $container->get(FilesInterface::class),
513 513
                 $core->memory
514 514
             );
Please login to merge, or discard this patch.
source/Spiral/Core/Memory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @param string $filename Cache filename.
55 55
      */
56
-    public function loadData(string $section, string $location = null, string &$filename = null)
56
+    public function loadData(string $section, string $location = null, string & $filename = null)
57 57
     {
58 58
         $filename = $this->memoryFilename($section, $location);
59 59
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $filename = $this->memoryFilename($section, $location);
77 77
 
78 78
         //We are packing data into plain php
79
-        $data = '<?php return ' . var_export($data, true) . ';';
79
+        $data = '<?php return '.var_export($data, true).';';
80 80
 
81 81
         //We need help to write file with directory creation
82 82
         $this->files->write($filename, $data, FilesInterface::RUNTIME, true);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public function getSections(string $location = null)
94 94
     {
95 95
         if (!empty($location)) {
96
-            $location = $this->directory . $location . '/';
96
+            $location = $this->directory.$location.'/';
97 97
         } else {
98 98
             $location = $this->directory;
99 99
         }
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
          * @var SplFileInfo $file
110 110
          */
111 111
         $sections = [];
112
-        foreach ($finder->name("*" . static::EXTENSION) as $file) {
112
+        foreach ($finder->name("*".static::EXTENSION) as $file) {
113 113
             $sections[] = substr($file->getRelativePathname(), 0, -1 * (strlen(static::EXTENSION)));
114 114
         }
115 115
 
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
         $name = strtolower(str_replace(['/', '\\'], '-', $name));
130 130
 
131 131
         if (!empty($location)) {
132
-            $location = $this->directory . $location . '/';
132
+            $location = $this->directory.$location.'/';
133 133
         } else {
134 134
             $location = $this->directory;
135 135
         }
136 136
 
137 137
         //Runtime cache
138
-        return $location . $name . static::EXTENSION;
138
+        return $location.$name.static::EXTENSION;
139 139
     }
140 140
 }
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
@@ -156,10 +156,10 @@  discard block
 block discarded – undo
156 156
 
157 157
         foreach ($this->namespaces[$namespace] as $directory) {
158 158
             //Seeking for view filename
159
-            if ($this->files->exists($directory . $filename)) {
159
+            if ($this->files->exists($directory.$filename)) {
160 160
 
161 161
                 $this->viewsCache[$path] = [
162
-                    self::VIEW_FILENAME  => $directory . $filename,
162
+                    self::VIEW_FILENAME  => $directory.$filename,
163 163
                     self::VIEW_NAMESPACE => $namespace,
164 164
                     self::VIEW_NAME      => $this->resolveName($filename)
165 165
                 ];
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         if (strpos($filename, '.') === false && !empty($this->extension)) {
188 188
             //Forcing default extension
189
-            $filename .= '.' . $this->extension;
189
+            $filename .= '.'.$this->extension;
190 190
         }
191 191
 
192 192
         if (strpos($filename, ViewsInterface::NS_SEPARATOR) !== false) {
Please login to merge, or discard this patch.
source/Spiral/Views/ProcessableLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
         $source = $this->loader->getSource($path);
62 62
 
63 63
         foreach ($this->processors as $processor) {
64
-            $benchmark = $this->benchmark('modify', $path . '@' . get_class($processor));
64
+            $benchmark = $this->benchmark('modify', $path.'@'.get_class($processor));
65 65
             try {
66 66
                 $source = $processor->modify(
67 67
                     $this->environment,
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 generateKey(string $path): string
61 61
     {
62
-        $hash = hash('md5', $path . '.' . $this->environment->getID());
62
+        $hash = hash('md5', $path.'.'.$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.
source/Spiral/Views/Processors/TranslateProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
53 53
     ): string {
54 54
         //Translator options must automatically route this view name to specific domain
55 55
         $domain = $this->translator->resolveDomain(
56
-            $this->options['prefix'] . str_replace(['/', '\\'], '-', $namespace . '-' . $name)
56
+            $this->options['prefix'].str_replace(['/', '\\'], '-', $namespace.'-'.$name)
57 57
         );
58 58
 
59 59
         //We are not forcing locale for now
60 60
 
61 61
         return preg_replace_callback($this->options['pattern'],
62
-            function ($matches) use ($domain) {
62
+            function($matches) use ($domain) {
63 63
                 return $this->translator->trans($matches[1], [], $domain);
64 64
             }, $source);
65 65
     }
Please login to merge, or discard this patch.
source/Spiral/Views/Processors/EnvironmentProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         string $namespace,
45 45
         string $name
46 46
     ): string {
47
-        return preg_replace_callback($this->pattern, function ($matches) use ($environment) {
47
+        return preg_replace_callback($this->pattern, function($matches) use ($environment) {
48 48
             return $environment->getValue($matches[1]);
49 49
         }, $source);
50 50
     }
Please login to merge, or discard this patch.
source/Spiral/Views/Processors/ExpressionsProcessors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
         }
98 98
 
99 99
         //We need unique temporary variable
100
-        $tempVariable = 'evaluator_' . str_replace('.', '_', uniqid('', true));
100
+        $tempVariable = 'evaluator_'.str_replace('.', '_', uniqid('', true));
101 101
 
102 102
         $lines = [
103 103
             $this->extractCode($tempVariable, $matches[3]),
Please login to merge, or discard this patch.