Test Failed
Push — master ( 147d4d...670e11 )
by Alain
03:28
created
src/View/ViewBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     {
142 142
         if (null === $type) {
143 143
             $view = $this->getViewFinder()->find([$uri], $engine);
144
-            return $view->setBuilder( $this );
144
+            return $view->setBuilder($this);
145 145
         }
146 146
 
147 147
         return $this->resolveType($type, $uri, $engine);
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function scanLocations(array $criteria)
212 212
     {
213
-        $uris = $this->locations->map(function ($location) use ($criteria) {
213
+        $uris = $this->locations->map(function($location) use ($criteria) {
214 214
             /** @var Location $location */
215 215
             return $location->getURI($criteria);
216
-        })->filter(function ($uri) {
216
+        })->filter(function($uri) {
217 217
             return false !== $uri;
218 218
         });
219 219
         
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
             $type = $type($uri, $engine, $this);
274 274
         }
275 275
 
276
-        if (! $type instanceof View) {
276
+        if ( ! $type instanceof View) {
277 277
             throw new FailedToInstantiateView(
278 278
                 sprintf(
279 279
                     _('Could not instantiate view "%s".'),
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
      */
297 297
     protected function getConfig($config = []): ConfigInterface
298 298
     {
299
-        $defaults = ConfigFactory::create(dirname(__DIR__, 2) . '/config/defaults.php', $config);
299
+        $defaults = ConfigFactory::create(dirname(__DIR__, 2).'/config/defaults.php', $config);
300 300
         $config   = $config
301 301
             ? ConfigFactory::createFromArray(array_merge_recursive($defaults->getArrayCopy(), $config->getArrayCopy()))
302 302
             : $defaults;
Please login to merge, or discard this patch.
src/View/Location/FilesystemLocation.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -124,18 +124,18 @@  discard block
 block discarded – undo
124 124
     {
125 125
         $names = [];
126 126
 
127
-        $names[] = array_map(function ($criterion) use ($extension) {
127
+        $names[] = array_map(function($criterion) use ($extension) {
128 128
             $uriExtension = URIHelper::containsExtension($criterion);
129
-            if (! empty($extension)) {
129
+            if ( ! empty($extension)) {
130 130
                 $extension = ltrim($extension, '.');
131 131
 
132 132
                 if ($uriExtension === $extension) {
133
-                    $criterion = substr($criterion,0,-strlen(".{$extension}"));
133
+                    $criterion = substr($criterion, 0, -strlen(".{$extension}"));
134 134
                 }
135 135
             } else {
136 136
                 $extension = URIHelper::containsExtension($criterion);
137
-                if (!empty($extension)) {
138
-                    $criterion = substr($criterion,0,-strlen(".{$extension}"));
137
+                if ( ! empty($extension)) {
138
+                    $criterion = substr($criterion, 0, -strlen(".{$extension}"));
139 139
                 }
140 140
             }
141 141
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                 : "{$criterion}\.{$extension}$";
147 147
         }, $criteria)[0];
148 148
 
149
-        return chr(1) . implode('|', array_unique($names)) . chr(1);
149
+        return chr(1).implode('|', array_unique($names)).chr(1);
150 150
     }
151 151
 
152 152
     /**
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
             $extensions = new Extensions(['']);
177 177
         }
178 178
 
179
-        if (! $extensions instanceof Extensions) {
180
-            $extensions = new Extensions((array)$extensions);
179
+        if ( ! $extensions instanceof Extensions) {
180
+            $extensions = new Extensions((array) $extensions);
181 181
         }
182 182
 
183 183
         return $extensions;
Please login to merge, or discard this patch.
src/View/Engine/NullEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
      */
51 51
     public function getRenderCallback(string $uri, array $context = []): callable
52 52
     {
53
-        return function () { return ''; };
53
+        return function() { return ''; };
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/View/Support/URIHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      */
35 35
     public static function hasExtension(string $uri, string $extension): bool
36 36
     {
37
-        $extension       = '.' . ltrim($extension, '.');
37
+        $extension       = '.'.ltrim($extension, '.');
38 38
         $uriLength       = mb_strlen($uri);
39 39
         $extensionLength = mb_strlen($extension);
40 40
         if ($extensionLength > $uriLength) {
Please login to merge, or discard this patch.
src/View/Support/AbstractFinder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     protected function initializeFindables($arguments = null): Findables
158 158
     {
159
-        return $this->findables->map(function ($findable) use ($arguments) {
159
+        return $this->findables->map(function($findable) use ($arguments) {
160 160
             return $this->initializeFindable($findable, $arguments);
161 161
         });
162 162
     }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             $findable = $this->instantiateFindableFromCallable($findable, $arguments);
199 199
         }
200 200
 
201
-        if (! $findable instanceof Findable) {
201
+        if ( ! $findable instanceof Findable) {
202 202
             throw new FailedToInstantiateFindable(
203 203
                 sprintf(
204 204
                     _('Could not instantiate Findable "%s".'),
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      */
223 223
     protected function instantiateFindableFromString(string $string, $arguments = []): Findable
224 224
     {
225
-        return new $string(...(array)$arguments);
225
+        return new $string(...(array) $arguments);
226 226
     }
227 227
 
228 228
     /**
@@ -237,6 +237,6 @@  discard block
 block discarded – undo
237 237
      */
238 238
     protected function instantiateFindableFromCallable(callable $callable, $arguments = []): Findable
239 239
     {
240
-        return $callable(...(array)$arguments);
240
+        return $callable(...(array) $arguments);
241 241
     }
242 242
 }
Please login to merge, or discard this patch.