@@ -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 | } |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | * Overrides configuration with environment variables. |
| 57 | 57 | */ |
| 58 | 58 | $data = $this->getData(); |
| 59 | - $applyEnv = function ($array) use ($data) { |
|
| 59 | + $applyEnv = function($array) use ($data) { |
|
| 60 | 60 | $iterator = new \RecursiveIteratorIterator( |
| 61 | 61 | new \RecursiveArrayIterator($array), |
| 62 | 62 | \RecursiveIteratorIterator::SELF_FIRST |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $dataDir = (string) $this->getBuilder()->getConfig()->get('data.dir'); |
| 52 | 52 | |
| 53 | 53 | // formating output |
| 54 | - $unicodeTreePrefix = function (RecursiveTreeIterator $tree) { |
|
| 54 | + $unicodeTreePrefix = function(RecursiveTreeIterator $tree) { |
|
| 55 | 55 | $prefixParts = [ |
| 56 | 56 | RecursiveTreeIterator::PREFIX_LEFT => ' ', |
| 57 | 57 | RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ', |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function generate(): void |
| 27 | 27 | { |
| 28 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 28 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 29 | 29 | return null !== $page->getVariable('external'); |
| 30 | 30 | }); |
| 31 | 31 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | public function generate(): void |
| 24 | 24 | { |
| 25 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 25 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 26 | 26 | return null !== $page->getVariable('redirect') |
| 27 | 27 | && $page->getVariable('layout') != 'redirect'; |
| 28 | 28 | }); |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | 'title' => '', |
| 14 | 14 | 'baseline' => '', |
| 15 | 15 | 'baseurl' => 'http://localhost:8000/', |
| 16 | - 'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl' |
|
| 16 | + 'canonicalurl' => false, // if true 'url()' function preprends URL wirh 'baseurl' |
|
| 17 | 17 | 'description' => '', |
| 18 | - 'taxonomies' => [ // default taxonomies |
|
| 18 | + 'taxonomies' => [// default taxonomies |
|
| 19 | 19 | 'tags' => 'tag', // can be disabled with 'disabled' value |
| 20 | 20 | 'categories' => 'category', |
| 21 | 21 | ], |
| 22 | 22 | 'pagination' => [ |
| 23 | - 'max' => 5, // number of pages on each paginated pages |
|
| 23 | + 'max' => 5, // number of pages on each paginated pages |
|
| 24 | 24 | 'path' => 'page', // path to paginated pages. ie: '/blog/page/2/' |
| 25 | 25 | ], |
| 26 | 26 | 'date' => [ |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | $buildProcess->setTty(Process::isTtySupported()); |
| 120 | 120 | $buildProcess->setPty(Process::isPtySupported()); |
| 121 | 121 | |
| 122 | - $processOutputCallback = function ($type, $data) use ($output) { |
|
| 122 | + $processOutputCallback = function($type, $data) use ($output) { |
|
| 123 | 123 | $output->write($data, false, OutputInterface::OUTPUT_RAW); |
| 124 | 124 | }; |
| 125 | 125 | |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function filterBy(PagesCollection $pages, string $variable, string $value): CollectionInterface |
| 202 | 202 | { |
| 203 | - $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) { |
|
| 203 | + $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) { |
|
| 204 | 204 | $notVirtual = false; |
| 205 | 205 | if (!$page->isVirtual()) { |
| 206 | 206 | $notVirtual = true; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | */ |
| 243 | 243 | public function sortByWeight(\Traversable $collection): array |
| 244 | 244 | { |
| 245 | - $callback = function ($a, $b) { |
|
| 245 | + $callback = function($a, $b) { |
|
| 246 | 246 | if (!isset($a['weight'])) { |
| 247 | 247 | $a['weight'] = 0; |
| 248 | 248 | } |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | */ |
| 272 | 272 | public function sortByDate(\Traversable $collection): array |
| 273 | 273 | { |
| 274 | - $callback = function ($a, $b) { |
|
| 274 | + $callback = function($a, $b) { |
|
| 275 | 275 | if ($a['date'] == $b['date']) { |
| 276 | 276 | return 0; |
| 277 | 277 | } |
@@ -136,8 +136,8 @@ |
||
| 136 | 136 | case PageType::TERM: |
| 137 | 137 | $layouts = [ |
| 138 | 138 | // "taxonomy/$term.$format.$ext", // ie: taxonomy/velo.html.twig |
| 139 | - "_default/term.$format.$ext", // ie: _default/term.html.twig |
|
| 140 | - "_default/list.$format.$ext", // ie: _default/list.html.twig |
|
| 139 | + "_default/term.$format.$ext", // ie: _default/term.html.twig |
|
| 140 | + "_default/list.$format.$ext", // ie: _default/list.html.twig |
|
| 141 | 141 | ]; |
| 142 | 142 | if ($page->getVariable('term')) { |
| 143 | 143 | $layouts = array_merge( |