@@ -124,12 +124,12 @@ discard block |
||
| 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)); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | { |
| 161 | 161 | $array = array_map('preg_quote', $array); |
| 162 | 162 | |
| 163 | - return '/' . implode('|', $array) . '/'; |
|
| 163 | + return '/'.implode('|', $array).'/'; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | $extensions = new Extensions(['']); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - if (! $extensions instanceof Extensions) { |
|
| 182 | - $extensions = new Extensions((array)$extensions); |
|
| 181 | + if ( ! $extensions instanceof Extensions) { |
|
| 182 | + $extensions = new Extensions((array) $extensions); |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return $extensions; |
@@ -205,10 +205,10 @@ discard block |
||
| 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 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | $type = $type($uri, $engine); |
| 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 |
||
| 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; |