@@ -25,7 +25,7 @@ |
||
25 | 25 | $template = $value['template'] ?? null; |
26 | 26 | $variables = $value['variables'] ?? []; |
27 | 27 | |
28 | - if (! $id || ! $template) { |
|
28 | + if (!$id || !$template) { |
|
29 | 29 | throw InvalidConfiguration::pageIdAndTemplateRequired(); |
30 | 30 | } |
31 | 31 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | $this->alt = $alt; |
17 | 17 | } |
18 | 18 | |
19 | - public static function make(string $src, ?string $sizes = null, ?string $alt = null): Image |
|
19 | + public static function make(string $src, ?string $sizes = null, ?string $alt = null) : Image |
|
20 | 20 | { |
21 | 21 | return new self($src, $sizes, $alt); |
22 | 22 | } |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | public function __construct(array $adapterConfiguration, VariableParser $variableParser) |
18 | 18 | { |
19 | - if (! $this->isValid($adapterConfiguration)) { |
|
19 | + if (!$this->isValid($adapterConfiguration)) { |
|
20 | 20 | throw InvalidConfiguration::invalidAdapterConfiguration('pagination', '`variable`, `parameter`, `perPage`'); |
21 | 21 | } |
22 | 22 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | return is_array($subject) && isset($subject['variable']) && isset($subject['parameter']); |
59 | 59 | } |
60 | 60 | |
61 | - protected function getEntries(array $pageConfiguration): ?array |
|
61 | + protected function getEntries(array $pageConfiguration): ? array |
|
62 | 62 | { |
63 | 63 | $variable = $pageConfiguration['variables'][$this->variable] ?? null; |
64 | 64 | $entries = $this->variableParser->parse($variable)['entries'] |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ]; |
99 | 99 | } |
100 | 100 | |
101 | - protected function createPreviousPagination(string $pageId, int $pageIndex): ?array |
|
101 | + protected function createPreviousPagination(string $pageId, int $pageIndex): ? array |
|
102 | 102 | { |
103 | 103 | if ($pageIndex <= 1) { |
104 | 104 | return null; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | ]; |
113 | 113 | } |
114 | 114 | |
115 | - protected function createNextPagination(string $pageId, int $pageIndex, int $pageCount): ?array |
|
115 | + protected function createNextPagination(string $pageId, int $pageIndex, int $pageCount): ? array |
|
116 | 116 | { |
117 | 117 | if ($pageIndex >= $pageCount) { |
118 | 118 | return null; |
@@ -128,6 +128,6 @@ discard block |
||
128 | 128 | |
129 | 129 | protected function createPaginatedUrl(string $pageId, int $index): string |
130 | 130 | { |
131 | - return str_replace('{' .$this->parameter. '}', "page-{$index}", $pageId); |
|
131 | + return str_replace('{' . $this->parameter . '}', "page-{$index}", $pageId); |
|
132 | 132 | } |
133 | 133 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $matcher = new UrlMatcher($routeCollection, new RequestContext()); |
29 | 29 | $matchingRoute = $matcher->match($this->filter); |
30 | 30 | |
31 | - $filteredConfiguration = array_filter($parsedConfiguration, function ($key) use ($matchingRoute) { |
|
31 | + $filteredConfiguration = array_filter($parsedConfiguration, function($key) use ($matchingRoute) { |
|
32 | 32 | return $key === $matchingRoute['_route']; |
33 | 33 | }, ARRAY_FILTER_USE_KEY); |
34 | 34 |