@@ -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 | } |
@@ -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 |
@@ -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 | } |
@@ -78,7 +78,7 @@ |
||
78 | 78 | * Apply environment variables. |
79 | 79 | */ |
80 | 80 | $data = $this->getData(); |
81 | - $applyEnv = function ($array) use ($data) { |
|
81 | + $applyEnv = function($array) use ($data) { |
|
82 | 82 | $iterator = new \RecursiveIteratorIterator( |
83 | 83 | new \RecursiveArrayIterator($array), |
84 | 84 | \RecursiveIteratorIterator::SELF_FIRST |
@@ -67,7 +67,7 @@ |
||
67 | 67 | foreach ($files as $file) { |
68 | 68 | $count++; |
69 | 69 | set_error_handler( |
70 | - function ($severity, $message, $file, $line) { |
|
70 | + function($severity, $message, $file, $line) { |
|
71 | 71 | throw new \ErrorException($message, 0, $severity, $file, $line, null); |
72 | 72 | } |
73 | 73 | ); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | */ |
21 | 21 | public function all(): self |
22 | 22 | { |
23 | - $filteredPages = $this->filter(function (Page $page) { |
|
23 | + $filteredPages = $this->filter(function(Page $page) { |
|
24 | 24 | if ($page->isVirtual() === false) { |
25 | 25 | return true; |
26 | 26 | } |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function sortByDate(): self |
38 | 38 | { |
39 | - return $this->usort(function ($a, $b) { |
|
39 | + return $this->usort(function($a, $b) { |
|
40 | 40 | if (!isset($a['date'])) { |
41 | 41 | return -1; |
42 | 42 | } |
@@ -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 (!isset($a['weight'])) { |
75 | 75 | return 1; |
76 | 76 | } |