@@ -132,7 +132,7 @@ |
||
132 | 132 | $this->options = array_merge([ |
133 | 133 | 'drafts' => false, // build drafts or not |
134 | 134 | 'dry-run' => false, // if dry-run is true, generated files are not saved |
135 | - 'page' => '', // specific page to build |
|
135 | + 'page' => '', // specific page to build |
|
136 | 136 | ], $options); |
137 | 137 | |
138 | 138 | // process each step |
@@ -132,7 +132,7 @@ |
||
132 | 132 | $buildProcess->setPty(Process::isPtySupported()); |
133 | 133 | $buildProcess->setTimeout(3600 * 2); // timeout = 2 minutes |
134 | 134 | |
135 | - $processOutputCallback = function ($type, $data) use ($output) { |
|
135 | + $processOutputCallback = function($type, $data) use ($output) { |
|
136 | 136 | $output->write($data, false, OutputInterface::OUTPUT_RAW); |
137 | 137 | }; |
138 | 138 |
@@ -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 | ); |
@@ -57,7 +57,7 @@ |
||
57 | 57 | public function process(): void |
58 | 58 | { |
59 | 59 | /** @var Page $page */ |
60 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
60 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
61 | 61 | return !empty($page->getRendered()); |
62 | 62 | }); |
63 | 63 | $max = count($filteredPages); |
@@ -146,7 +146,7 @@ |
||
146 | 146 | */ |
147 | 147 | protected function collectPages(): void |
148 | 148 | { |
149 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
149 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
150 | 150 | return $page->hasVariable('menu') |
151 | 151 | && $page->getVariable('published') |
152 | 152 | && in_array($page->getVariable('language', $this->config->getLanguageDefault()), array_column($this->config->getLanguages(), 'code')); |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $this->generate(); |
51 | 51 | |
52 | 52 | // set default language (e.g.: "en") if necessary |
53 | - $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) { |
|
53 | + $this->generatedPages->map(function(\Cecil\Collection\Page\Page $page) { |
|
54 | 54 | if ($page->getVariable('language') === null) { |
55 | 55 | $page->setVariable('language', $this->config->getLanguageDefault()); |
56 | 56 | } |
@@ -136,7 +136,7 @@ |
||
136 | 136 | */ |
137 | 137 | public function getPages(): \Cecil\Collection\Page\Collection |
138 | 138 | { |
139 | - return $this->builder->getPages()->filter(function (CollectionPage $page) { |
|
139 | + return $this->builder->getPages()->filter(function(CollectionPage $page) { |
|
140 | 140 | // We should fix case of virtual pages without language |
141 | 141 | if ($page->getVariable('language') === null && $this->language == $this->config->getLanguageDefault()) { |
142 | 142 | return true; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | $page = clone $this->builder->getPages()->get($pageId); |
42 | 42 | } |
43 | 43 | // collects all pages |
44 | - $subPages = $this->builder->getPages()->filter(function (Page $page) use ($language) { |
|
44 | + $subPages = $this->builder->getPages()->filter(function(Page $page) use ($language) { |
|
45 | 45 | return $page->getType() == TYPE::PAGE |
46 | 46 | && $page->isVirtual() === false |
47 | 47 | && $page->getVariable('exclude') !== true |
@@ -100,10 +100,10 @@ |
||
100 | 100 | $this->builder->getLogger()->debug('Intl extension is loaded'); |
101 | 101 | } |
102 | 102 | // filters fallback |
103 | - $this->twig->registerUndefinedFilterCallback(function ($name) { |
|
103 | + $this->twig->registerUndefinedFilterCallback(function($name) { |
|
104 | 104 | switch ($name) { |
105 | 105 | case 'localizeddate': |
106 | - return new \Twig\TwigFilter($name, function (\DateTime $value = null) { |
|
106 | + return new \Twig\TwigFilter($name, function(\DateTime $value = null) { |
|
107 | 107 | return date((string) $this->builder->getConfig()->get('date.format'), $value->getTimestamp()); |
108 | 108 | }); |
109 | 109 | } |