@@ -66,7 +66,7 @@ |
||
66 | 66 | ); |
67 | 67 | } |
68 | 68 | |
69 | - $closure = function () use ($uri, $context) { |
|
69 | + $closure = function() use ($uri, $context) { |
|
70 | 70 | |
71 | 71 | // Save current buffering level so we can backtrack in case of an error. |
72 | 72 | // This is needed because the view itself might also add an unknown number of output buffering levels. |
@@ -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)); |
@@ -158,11 +158,11 @@ discard block |
||
158 | 158 | */ |
159 | 159 | protected function arrayToRegexPattern(array $array) |
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 | /** |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | if ( ! $extensions instanceof Extensions) { |
184 | - $extensions = new Extensions((array)$extensions); |
|
184 | + $extensions = new Extensions((array) $extensions); |
|
185 | 185 | } |
186 | 186 | |
187 | 187 | return $extensions; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | ); |
66 | 66 | } |
67 | 67 | |
68 | - return $this->exists(function ($key, $element) use ($location) { |
|
68 | + return $this->exists(function($key, $element) use ($location) { |
|
69 | 69 | return $location == $element; |
70 | 70 | }); |
71 | 71 | } |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | */ |
202 | 202 | public function scanLocations(array $criteria) |
203 | 203 | { |
204 | - $uris = $this->locations->map(function ($location) use ($criteria) { |
|
204 | + $uris = $this->locations->map(function($location) use ($criteria) { |
|
205 | 205 | /** @var Location $location */ |
206 | 206 | return $location->getURI($criteria); |
207 | - })->filter(function ($uri) { |
|
207 | + })->filter(function($uri) { |
|
208 | 208 | return false !== $uri; |
209 | 209 | }); |
210 | 210 | |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | */ |
282 | 282 | protected function getConfig($config = null) |
283 | 283 | { |
284 | - $defaults = ConfigFactory::create(__DIR__ . '/../../config/defaults.php', $config); |
|
284 | + $defaults = ConfigFactory::create(__DIR__.'/../../config/defaults.php', $config); |
|
285 | 285 | $config = $config |
286 | 286 | ? ConfigFactory::createFromArray(array_merge_recursive($defaults->getArrayCopy(), $config->getArrayCopy())) |
287 | 287 | : $defaults; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | protected function initializeFindables($arguments = null) |
152 | 152 | { |
153 | - $this->findables = $this->findables->map(function ($findable) use ($arguments) { |
|
153 | + $this->findables = $this->findables->map(function($findable) use ($arguments) { |
|
154 | 154 | return $this->initializeFindable($findable, $arguments); |
155 | 155 | }); |
156 | 156 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | */ |
216 | 216 | protected function instantiateFindableFromString($string, $arguments = []) |
217 | 217 | { |
218 | - return new $string(...(array)$arguments); |
|
218 | + return new $string(...(array) $arguments); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -230,6 +230,6 @@ discard block |
||
230 | 230 | */ |
231 | 231 | protected function instantiateFindableFromCallable($callable, $arguments = []) |
232 | 232 | { |
233 | - return $callable(...(array)$arguments); |
|
233 | + return $callable(...(array) $arguments); |
|
234 | 234 | } |
235 | 235 | } |