Test Failed
Push — master ( 0e8283...90a3be )
by Alain
05:03
created
src/View/Engine/NullEngine.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      * @param string $uri     URI to render.
47 47
      * @param array  $context Context in which to render.
48 48
      *
49
-     * @return callable Rendering callback.
49
+     * @return string Rendering callback.
50 50
      */
51 51
     public function getRenderCallback(string $uri, array $context = []): callable
52 52
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.
src/View/ViewBuilder.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      * @since 0.1.0
95 95
      *
96 96
      * @param string $view View identifier to create a view for.
97
-     * @param mixed  $type Type of view to create.
97
+     * @param string|null  $type Type of view to create.
98 98
      *
99 99
      * @return View Instance of the requested view.
100 100
      * @throws FailedToInstantiateView If the view could not be instantiated.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      *
200 200
      * @since 0.1.0
201 201
      *
202
-     * @param array $criteria Criteria to match.
202
+     * @param string[] $criteria Criteria to match.
203 203
      *
204 204
      * @return string|false URI of the requested view, or false if not found.
205 205
      */
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      *
282 282
      * @since 0.2.0
283 283
      *
284
-     * @param ConfigInterface|array $config Config to merge with defaults.
284
+     * @param null|ConfigInterface $config Config to merge with defaults.
285 285
      *
286 286
      * @return ConfigInterface Configuration passed in through the constructor.
287 287
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
@@ -205,10 +205,10 @@  discard block
 block discarded – undo
205 205
      */
206 206
     public function scanLocations(array $criteria)
207 207
     {
208
-        $uris = $this->locations->map(function ($location) use ($criteria) {
208
+        $uris = $this->locations->map(function($location) use ($criteria) {
209 209
             /** @var Location $location */
210 210
             return $location->getURI($criteria);
211
-        })->filter(function ($uri) {
211
+        })->filter(function($uri) {
212 212
             return false !== $uri;
213 213
         });
214 214
 
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
             $type = $type($uri, $engine);
265 265
         }
266 266
 
267
-        if (! $type instanceof View) {
267
+        if ( ! $type instanceof View) {
268 268
             throw new FailedToInstantiateView(
269 269
                 sprintf(
270 270
                     _('Could not instantiate view "%s".'),
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      */
288 288
     protected function getConfig($config = []): ConfigInterface
289 289
     {
290
-        $defaults = ConfigFactory::create(dirname(__DIR__, 2) . '/config/defaults.php', $config);
290
+        $defaults = ConfigFactory::create(dirname(__DIR__, 2).'/config/defaults.php', $config);
291 291
         $config   = $config
292 292
             ? ConfigFactory::createFromArray(array_merge_recursive($defaults->getArrayCopy(), $config->getArrayCopy()))
293 293
             : $defaults;
Please login to merge, or discard this patch.
src/Views.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.
src/View/Location/URIs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.
src/View/Location/FilesystemLocation.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
@@ -124,12 +124,12 @@  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
             $criterion = URIHelper::getFilename($criterion);
129 129
 
130 130
             return empty($extension) || URIHelper::hasExtension($criterion, $extension)
131 131
                 ? $criterion
132
-                : $criterion . $extension;
132
+                : $criterion.$extension;
133 133
         }, $criteria)[0];
134 134
 
135 135
         return $this->arrayToRegexPattern(array_unique($names));
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
      */
159 159
     protected function arrayToRegexPattern(array $array): string
160 160
     {
161
-        $array = array_map(function ($entry) {
161
+        $array = array_map(function($entry) {
162 162
             return preg_quote($entry);
163 163
         }, $array);
164 164
 
165
-        return '/' . implode('|', $array) . '/';
165
+        return '/'.implode('|', $array).'/';
166 166
     }
167 167
 
168 168
     /**
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
             $extensions = new Extensions(['']);
181 181
         }
182 182
 
183
-        if (! $extensions instanceof Extensions) {
184
-            $extensions = new Extensions((array)$extensions);
183
+        if ( ! $extensions instanceof Extensions) {
184
+            $extensions = new Extensions((array) $extensions);
185 185
         }
186 186
 
187 187
         return $extensions;
Please login to merge, or discard this patch.
src/View/Location/Location.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.
src/View/Location/Locations.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function hasLocation(Location $location): bool
55 55
     {
56
-        return $this->exists(function ($key, $element) use ($location) {
56
+        return $this->exists(function($key, $element) use ($location) {
57 57
             return $location == $element;
58 58
         });
59 59
     }
Please login to merge, or discard this patch.
src/View/Support/NullObject.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.
src/View/Support/Findable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * Bright Nucleus View Component.
4 4
  *
Please login to merge, or discard this patch.