@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface |
| 214 | 214 | { |
| 215 | - $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) { |
|
| 215 | + $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) { |
|
| 216 | 216 | // is a dedicated getter exists? |
| 217 | 217 | $method = 'get'.ucfirst($variable); |
| 218 | 218 | if (method_exists($page, $method) && $page->$method() == $value) { |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | */ |
| 247 | 247 | public function sortByWeight(\Traversable $collection): array |
| 248 | 248 | { |
| 249 | - $callback = function ($a, $b) { |
|
| 249 | + $callback = function($a, $b) { |
|
| 250 | 250 | if (!isset($a['weight'])) { |
| 251 | 251 | $a['weight'] = 0; |
| 252 | 252 | } |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | */ |
| 273 | 273 | public function sortByDate(\Traversable $collection, string $variable = 'date', bool $descTitle = false): array |
| 274 | 274 | { |
| 275 | - $callback = function ($a, $b) use ($variable, $descTitle) { |
|
| 275 | + $callback = function($a, $b) use ($variable, $descTitle) { |
|
| 276 | 276 | if ($a[$variable] == $b[$variable]) { |
| 277 | 277 | // if dates are equal and "descTitle" is true |
| 278 | 278 | if ($descTitle && (isset($a['title']) && isset($b['title']))) { |