@@ -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 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | // filter pages: home and sections |
30 | - $filteredPages = $this->pagesCollection->filter(function (Page $page) { |
|
30 | + $filteredPages = $this->pagesCollection->filter(function(Page $page) { |
|
31 | 31 | return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]); |
32 | 32 | }); |
33 | 33 | /* @var $page Page */ |
@@ -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 | } |
@@ -43,7 +43,7 @@ |
||
43 | 43 | $themeConfigFile = $this->config->getThemesPath().'/'.$theme.'/'.self::THEME_CONFIG_FILE; |
44 | 44 | if (Util::getFS()->exists($themeConfigFile)) { |
45 | 45 | set_error_handler( |
46 | - function ($severity, $message, $file, $line) { |
|
46 | + function($severity, $message, $file, $line) { |
|
47 | 47 | throw new \ErrorException($message, 0, $severity, $file, $line, null); |
48 | 48 | } |
49 | 49 | ); |
@@ -17,6 +17,7 @@ |
||
17 | 17 | * Give Builder to object. |
18 | 18 | * |
19 | 19 | * @param \Cecil\Builder $builder |
20 | + * @return void |
|
20 | 21 | */ |
21 | 22 | public function __construct(\Cecil\Builder $builder); |
22 | 23 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | |
54 | 54 | // collect published pages |
55 | 55 | /* @var $page Page */ |
56 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
56 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
57 | 57 | return !empty($page->getVariable('published')); |
58 | 58 | }); |
59 | 59 | $max = count($filteredPages); |
@@ -90,7 +90,7 @@ |
||
90 | 90 | */ |
91 | 91 | public function getPages() |
92 | 92 | { |
93 | - return $this->builder->getPages()->filter(function (Page $page) { |
|
93 | + return $this->builder->getPages()->filter(function(Page $page) { |
|
94 | 94 | return $page->getVariable('published'); |
95 | 95 | }); |
96 | 96 | } |