@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * reverse => false|true |
64 | 64 | * ] |
65 | 65 | */ |
66 | - public function sortBy(string|array|null $options): self |
|
66 | + public function sortBy(string | array | null $options): self |
|
67 | 67 | { |
68 | 68 | $sortBy = \is_string($options) ? $options : $options['variable'] ?? 'date'; |
69 | 69 | $sortMethod = \sprintf('sortBy%s', ucfirst(str_replace('updated', 'date', $sortBy))); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | /** |
78 | 78 | * Sorts pages by date (or 'updated'): the most recent first. |
79 | 79 | */ |
80 | - public function sortByDate(string|array|null $options = null): self |
|
80 | + public function sortByDate(string | array | null $options = null): self |
|
81 | 81 | { |
82 | 82 | $opt = []; |
83 | 83 | // backward compatibility (i.e. $options = 'updated') |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | /** |
112 | 112 | * Sorts pages by title (natural sort). |
113 | 113 | */ |
114 | - public function sortByTitle(string|array|null $options = null): self |
|
114 | + public function sortByTitle(string | array | null $options = null): self |
|
115 | 115 | { |
116 | 116 | $opt = []; |
117 | 117 | // options |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | /** |
126 | 126 | * Sorts by weight (the heaviest first). |
127 | 127 | */ |
128 | - public function sortByWeight(string|array|null $options = null): self |
|
128 | + public function sortByWeight(string | array | null $options = null): self |
|
129 | 129 | { |
130 | 130 | $opt = []; |
131 | 131 | // options |
@@ -304,7 +304,7 @@ |
||
304 | 304 | /** |
305 | 305 | * Set configuration. |
306 | 306 | */ |
307 | - public function setConfig(array|Config $config): self |
|
307 | + public function setConfig(array | Config $config): self |
|
308 | 308 | { |
309 | 309 | if (\is_array($config)) { |
310 | 310 | $config = new Config($config); |
@@ -58,8 +58,8 @@ |
||
58 | 58 | |
59 | 59 | // handles options |
60 | 60 | $canonical = null; // if true prefix url with baseurl config |
61 | - $format = null; // output format |
|
62 | - $language = null; // force language |
|
61 | + $format = null; // output format |
|
62 | + $language = null; // force language |
|
63 | 63 | extract(\is_array($options) ? $options : [], EXTR_IF_EXISTS); |
64 | 64 | |
65 | 65 | // base URL |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | case PageType::VOCABULARY->value: |
135 | 135 | $layouts = [ |
136 | 136 | // "taxonomy/$plural.$format.$ext", // e.g.: taxonomy/tags.html.twig |
137 | - "vocabulary.$format.$ext", // e.g.: vocabulary.html.twig |
|
137 | + "vocabulary.$format.$ext", // e.g.: vocabulary.html.twig |
|
138 | 138 | "_default/vocabulary.$format.$ext", // e.g.: _default/vocabulary.html.twig |
139 | 139 | ]; |
140 | 140 | if ($page->hasVariable('plural')) { |
@@ -145,9 +145,9 @@ discard block |
||
145 | 145 | $layouts = [ |
146 | 146 | // "taxonomy/$term.$format.$ext", // e.g.: taxonomy/velo.html.twig |
147 | 147 | // "taxonomy/$singular.$format.$ext", // e.g.: taxonomy/tag.html.twig |
148 | - "term.$format.$ext", // e.g.: term.html.twig |
|
149 | - "_default/term.$format.$ext", // e.g.: _default/term.html.twig |
|
150 | - "_default/list.$format.$ext", // e.g.: _default/list.html.twig |
|
148 | + "term.$format.$ext", // e.g.: term.html.twig |
|
149 | + "_default/term.$format.$ext", // e.g.: _default/term.html.twig |
|
150 | + "_default/list.$format.$ext", // e.g.: _default/list.html.twig |
|
151 | 151 | ]; |
152 | 152 | if ($page->hasVariable('term')) { |
153 | 153 | $layouts = array_merge(["taxonomy/{$page->getVariable('term')}.$format.$ext"], $layouts); |