@@ -23,14 +23,14 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $id = $value['id'] ?? null; |
| 25 | 25 | |
| 26 | - if (! $id) { |
|
| 26 | + if (!$id) { |
|
| 27 | 27 | throw InvalidConfiguration::pageIdMissing($value); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | $template = $value['template'] ?? null; |
| 31 | 31 | $variables = $value['variables'] ?? []; |
| 32 | 32 | |
| 33 | - if (! $template) { |
|
| 33 | + if (!$template) { |
|
| 34 | 34 | throw InvalidConfiguration::pageTemplateMissing($id); |
| 35 | 35 | } |
| 36 | 36 | |
@@ -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 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | $pluginConfiguration = require $configurationPath; |
| 119 | 119 | |
| 120 | - if (! \is_array($pluginConfiguration)) { |
|
| 120 | + if (!\is_array($pluginConfiguration)) { |
|
| 121 | 121 | throw InvalidPlugin::configurationMustBeArray($pluginClass, $configurationPath); |
| 122 | 122 | } |
| 123 | 123 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | { |
| 155 | 155 | $routeFile = File::path('src/routes.php'); |
| 156 | 156 | |
| 157 | - if (! file_exists($routeFile)) { |
|
| 157 | + if (!file_exists($routeFile)) { |
|
| 158 | 158 | return; |
| 159 | 159 | } |
| 160 | 160 | |
@@ -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); |