@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | public function all(): self |
| 26 | 26 | { |
| 27 | - $filteredPages = $this->filter(function (Page $page) { |
|
| 27 | + $filteredPages = $this->filter(function(Page $page) { |
|
| 28 | 28 | if ($page->isVirtual() === false |
| 29 | 29 | && $page->getVariable('published') === true |
| 30 | 30 | && $page->getVariable('exclude') !== true) { |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function sortByDate(): self |
| 44 | 44 | { |
| 45 | - return $this->usort(function ($a, $b) { |
|
| 45 | + return $this->usort(function($a, $b) { |
|
| 46 | 46 | if ($a['date'] == $b['date']) { |
| 47 | 47 | return 0; |
| 48 | 48 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function sortByTitle(): self |
| 60 | 60 | { |
| 61 | - return $this->usort(function ($a, $b) { |
|
| 61 | + return $this->usort(function($a, $b) { |
|
| 62 | 62 | return strnatcmp($a['title'], $b['title']); |
| 63 | 63 | }); |
| 64 | 64 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function sortByWeight(): self |
| 72 | 72 | { |
| 73 | - return $this->usort(function ($a, $b) { |
|
| 73 | + return $this->usort(function($a, $b) { |
|
| 74 | 74 | if ($a['weight'] == $b['weight']) { |
| 75 | 75 | return 0; |
| 76 | 76 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | protected function collectTermsFromPages() |
| 96 | 96 | { |
| 97 | 97 | /** @var Page $page */ |
| 98 | - $pages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 98 | + $pages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 99 | 99 | return $page->getVariable('published'); |
| 100 | 100 | })->sortByDate(); |
| 101 | 101 | foreach ($pages as $page) { |
@@ -135,7 +135,7 @@ |
||
| 135 | 135 | { |
| 136 | 136 | $count = 0; |
| 137 | 137 | |
| 138 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 138 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 139 | 139 | return $page->hasVariable('menu') && $page->getVariable('published'); |
| 140 | 140 | }); |
| 141 | 141 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // filters pages: home, sections and terms |
| 32 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 32 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 33 | 33 | return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]); |
| 34 | 34 | }); |
| 35 | 35 | /** @var Page $page */ |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $paginationPath = $pagePagination['path']; |
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | - $pages = $pages->filter(function (Page $page) { |
|
| 61 | + $pages = $pages->filter(function(Page $page) { |
|
| 62 | 62 | return $page->getVariable('published'); |
| 63 | 63 | }); |
| 64 | 64 | $pagesTotal = count($pages); |