@@ -68,7 +68,7 @@ |
||
| 68 | 68 | foreach ($configurationFiles as $configurationFile) { |
| 69 | 69 | $loadedFileConfiguration = require $configurationFile; |
| 70 | 70 | |
| 71 | - if (! \is_array($loadedFileConfiguration)) { |
|
| 71 | + if (!\is_array($loadedFileConfiguration)) { |
|
| 72 | 72 | continue; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $adapterConfiguration |
| 68 | 68 | ); |
| 69 | 69 | |
| 70 | - if (! $adapter) { |
|
| 70 | + if (!$adapter) { |
|
| 71 | 71 | throw InvalidConfiguration::adapterNotFound($adapterType); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | public static function staticFile(string $path): self |
| 13 | 13 | { |
| 14 | - return self::withPath($path, 'This file was tried to be copied as a static file. Please see your `staticFiles` configuration.' ); |
|
| 14 | + return self::withPath($path, 'This file was tried to be copied as a static file. Please see your `staticFiles` configuration.'); |
|
| 15 | 15 | } |
| 16 | 16 | } |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | { |
| 44 | 44 | $this->setRule( |
| 45 | 45 | CollectionAdapter::class, |
| 46 | - function (string $adapterType, array $adapterConfiguration) { |
|
| 46 | + function(string $adapterType, array $adapterConfiguration) { |
|
| 47 | 47 | if ($adapterType !== 'collection') { |
| 48 | 48 | return null; |
| 49 | 49 | } |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $this->setRule( |
| 59 | 59 | FilterAdapter::class, |
| 60 | - function (string $adapterType, array $adapterConfiguration) { |
|
| 60 | + function(string $adapterType, array $adapterConfiguration) { |
|
| 61 | 61 | if ($adapterType !== 'filter') { |
| 62 | 62 | return null; |
| 63 | 63 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | $this->setRule( |
| 73 | 73 | PaginationAdapter::class, |
| 74 | - function (string $adapterType, array $adapterConfiguration) { |
|
| 74 | + function(string $adapterType, array $adapterConfiguration) { |
|
| 75 | 75 | if ($adapterType !== 'pagination') { |
| 76 | 76 | return null; |
| 77 | 77 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | { |
| 86 | 86 | $this->setRule( |
| 87 | 87 | OrderAdapter::class, |
| 88 | - function (string $adapterType, array $adapterConfiguration) { |
|
| 88 | + function(string $adapterType, array $adapterConfiguration) { |
|
| 89 | 89 | if ($adapterType !== 'order') { |
| 90 | 90 | return null; |
| 91 | 91 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | array $adapterConfiguration, |
| 32 | 32 | VariableParser $variableParser |
| 33 | 33 | ) { |
| 34 | - if (! $this->isValidConfiguration($adapterConfiguration)) { |
|
| 34 | + if (!$this->isValidConfiguration($adapterConfiguration)) { |
|
| 35 | 35 | throw InvalidOrderAdapter::create(); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | private function orderEntries(array $entries): array |
| 80 | 80 | { |
| 81 | - uasort($entries, function ($a, $b) { |
|
| 81 | + uasort($entries, function($a, $b) { |
|
| 82 | 82 | return strcmp($a[$this->field] ?? '', $b[$this->field] ?? ''); |
| 83 | 83 | }); |
| 84 | 84 | |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | { |
| 35 | 35 | $template = $this->errorPages[$statusCode] ?? null; |
| 36 | 36 | |
| 37 | - if (! $template) { |
|
| 37 | + if (!$template) { |
|
| 38 | 38 | return $this->handleStaticError($exception); |
| 39 | 39 | } |
| 40 | 40 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $html = file_get_contents($this->defaultErrorPage); |
| 50 | 50 | |
| 51 | - if (! $exception) { |
|
| 51 | + if (!$exception) { |
|
| 52 | 52 | return $html; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | { |
| 85 | 85 | $fs = new Filesystem(); |
| 86 | 86 | |
| 87 | - $pages->each(function (Page $page, string $pageId) use ($fs) { |
|
| 87 | + $pages->each(function(Page $page, string $pageId) use ($fs) { |
|
| 88 | 88 | $fileName = $pageId === '/' ? 'index' : $pageId; |
| 89 | 89 | |
| 90 | 90 | $renderedPage = $this->pageRenderer->render($page); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | protected function getRequest(): Request |
| 58 | 58 | { |
| 59 | - if (! $this->request) { |
|
| 59 | + if (!$this->request) { |
|
| 60 | 60 | $this->request = ServerRequest::fromGlobals(); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | |
| 73 | 73 | protected function handleDynamicRoute(): ?Response |
| 74 | 74 | { |
| 75 | - if (! $this->router) { |
|
| 75 | + if (!$this->router) { |
|
| 76 | 76 | return null; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | try { |
| 92 | 92 | $response = $this->handleStaticRoute(); |
| 93 | 93 | |
| 94 | - if (! $response) { |
|
| 94 | + if (!$response) { |
|
| 95 | 95 | $response = $this->handleDynamicRoute(); |
| 96 | 96 | } |
| 97 | 97 | } catch (StitcherException $e) { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | protected function handleResponse(Response $response): string |
| 123 | 123 | { |
| 124 | 124 | foreach ($response->getHeaders() as $name => $headers) { |
| 125 | - header($name . ':'. implode(', ', $headers)); |
|
| 125 | + header($name . ':' . implode(', ', $headers)); |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | if ($this->headerContainer) { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->parsed = $this->parser->parse(File::read($this->unparsed)); |
| 37 | 37 | |
| 38 | 38 | foreach ($this->parsed as $id => $parsedItem) { |
| 39 | - if (! \is_array($parsedItem) || isset($parsedItem['id'])) { |
|
| 39 | + if (!\is_array($parsedItem) || isset($parsedItem['id'])) { |
|
| 40 | 40 | continue; |
| 41 | 41 | } |
| 42 | 42 | |