@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function sortByDate(): self |
| 25 | 25 | { |
| 26 | - return $this->usort(function ($a, $b) { |
|
| 26 | + return $this->usort(function($a, $b) { |
|
| 27 | 27 | if (!isset($a['date'])) { |
| 28 | 28 | return -1; |
| 29 | 29 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | call_user_func_array($this->builder->getMessageCb(), ['SAVE', 'Saving pages']); |
| 47 | 47 | |
| 48 | 48 | /* @var $page Page */ |
| 49 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 49 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 50 | 50 | return !empty($page->getVariable('rendered')); |
| 51 | 51 | }); |
| 52 | 52 | $max = count($filteredPages); |
@@ -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 | $notVirtual = false; |
| 131 | 131 | // not virtual only |
| 132 | 132 | if (!$page->isVirtual()) { |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function sortByWeight($collection): array |
| 175 | 175 | { |
| 176 | - $callback = function ($a, $b) { |
|
| 176 | + $callback = function($a, $b) { |
|
| 177 | 177 | if (!isset($a['weight'])) { |
| 178 | 178 | return 1; |
| 179 | 179 | } |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | */ |
| 207 | 207 | public function sortByDate($collection): array |
| 208 | 208 | { |
| 209 | - $callback = function ($a, $b) { |
|
| 209 | + $callback = function($a, $b) { |
|
| 210 | 210 | if (!isset($a['date'])) { |
| 211 | 211 | return -1; |
| 212 | 212 | } |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function generate(): void |
| 23 | 23 | { |
| 24 | - $filteredPages = $this->pagesCollection->filter(function (Page $page) { |
|
| 24 | + $filteredPages = $this->pagesCollection->filter(function(Page $page) { |
|
| 25 | 25 | return null !== $page->getVariable('redirect') |
| 26 | 26 | && $page->getVariable('layout') != 'redirect'; |
| 27 | 27 | }); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function generate(): void |
| 24 | 24 | { |
| 25 | - $filteredPages = $this->pagesCollection->filter(function (Page $page) { |
|
| 25 | + $filteredPages = $this->pagesCollection->filter(function(Page $page) { |
|
| 26 | 26 | return null !== $page->getVariable('external'); |
| 27 | 27 | }); |
| 28 | 28 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function generate(): void |
| 23 | 23 | { |
| 24 | - $subPages = $this->pagesCollection->filter(function (Page $page) { |
|
| 24 | + $subPages = $this->pagesCollection->filter(function(Page $page) { |
|
| 25 | 25 | return $page->getType() == TYPE::PAGE |
| 26 | 26 | && $page->getId() != 'index'; // exclude homepage |
| 27 | 27 | }); |
@@ -113,8 +113,8 @@ |
||
| 113 | 113 | case PageType::TERM: |
| 114 | 114 | $layouts = [ |
| 115 | 115 | // "taxonomy/$term.$format.twig", // ie: taxonomy/velo.html.twig |
| 116 | - "_default/term.$format.twig", // ie: _default/term.html.twig |
|
| 117 | - "_default/list.$format.twig", // ie: _default/list.html.twig |
|
| 116 | + "_default/term.$format.twig", // ie: _default/term.html.twig |
|
| 117 | + "_default/list.$format.twig", // ie: _default/list.html.twig |
|
| 118 | 118 | ]; |
| 119 | 119 | if ($page->getVariable('term')) { |
| 120 | 120 | $layouts = array_merge( |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | protected function searchItem(string $id): ?array |
| 68 | 68 | { |
| 69 | - return array_filter($this->items, function (ItemInterface $item) use ($id) { |
|
| 69 | + return array_filter($this->items, function(ItemInterface $item) use ($id) { |
|
| 70 | 70 | return $item->getId() == $id; |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | */ |
| 241 | 241 | public function usort(\Closure $callback = null): CollectionInterface |
| 242 | 242 | { |
| 243 | - $callback ? usort($this->items, $callback) : usort($this->items, function ($a, $b) { |
|
| 243 | + $callback ? usort($this->items, $callback) : usort($this->items, function($a, $b) { |
|
| 244 | 244 | if ($a == $b) { |
| 245 | 245 | return 0; |
| 246 | 246 | } |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $count = 0; |
| 107 | 107 | |
| 108 | 108 | $filteredPages = $this->builder->getPages() |
| 109 | - ->filter(function (Page $page) { |
|
| 109 | + ->filter(function(Page $page) { |
|
| 110 | 110 | if ($page->getVariable('menu')) { |
| 111 | 111 | return true; |
| 112 | 112 | } |