@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface |
| 128 | 128 | { |
| 129 | - $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) { |
|
| 129 | + $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) { |
|
| 130 | 130 | // dedicated getter? |
| 131 | 131 | $method = 'get'.ucfirst($variable); |
| 132 | 132 | if (method_exists($page, $method) && $page->$method() == $value) { |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | */ |
| 169 | 169 | public function sortByWeight($collection): array |
| 170 | 170 | { |
| 171 | - $callback = function ($a, $b) { |
|
| 171 | + $callback = function($a, $b) { |
|
| 172 | 172 | if (!isset($a['weight'])) { |
| 173 | 173 | return 1; |
| 174 | 174 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function sortByDate($collection): array |
| 203 | 203 | { |
| 204 | - $callback = function ($a, $b) { |
|
| 204 | + $callback = function($a, $b) { |
|
| 205 | 205 | if (!isset($a['date'])) { |
| 206 | 206 | return -1; |
| 207 | 207 | } |