@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | $fs = new Filesystem(); |
14 | 14 | |
15 | - if (! $fs->exists($templateDirectory)) { |
|
15 | + if (!$fs->exists($templateDirectory)) { |
|
16 | 16 | $fs->mkdir($templateDirectory); |
17 | 17 | } |
18 | 18 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | public function __construct(array $adapterConfiguration, VariableParser $variableParser) |
18 | 18 | { |
19 | - if (! $this->isValidConfiguration($adapterConfiguration)) { |
|
19 | + if (!$this->isValidConfiguration($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 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | public function __construct(array $adapterConfiguration, VariableParser $variableParser) |
17 | 17 | { |
18 | - if (! $this->isValidConfiguration($adapterConfiguration)) { |
|
18 | + if (!$this->isValidConfiguration($adapterConfiguration)) { |
|
19 | 19 | throw InvalidConfiguration::invalidAdapterConfiguration('collection', '`variable` and `parameter`'); |
20 | 20 | } |
21 | 21 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | return is_array($subject) && isset($subject['variable']) && isset($subject['parameter']); |
49 | 49 | } |
50 | 50 | |
51 | - protected function getEntries($pageConfiguration): ?array |
|
51 | + protected function getEntries($pageConfiguration): ? array |
|
52 | 52 | { |
53 | 53 | $variable = $pageConfiguration['variables'][$this->variable] ?? null; |
54 | 54 |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function __construct(array $adapterConfiguration, VariableParser $variableParser) |
16 | 16 | { |
17 | - if (! $this->isValidConfiguration($adapterConfiguration)) { |
|
17 | + if (!$this->isValidConfiguration($adapterConfiguration)) { |
|
18 | 18 | throw InvalidConfiguration::invalidAdapterConfiguration('filter', '`field`: `filter`'); |
19 | 19 | } |
20 | 20 |