@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | /** @var Collection $pages */ |
67 | 67 | $pages = $this->builder->getPages() |
68 | 68 | // published only |
69 | - ->filter(function (Page $page) { |
|
69 | + ->filter(function(Page $page) { |
|
70 | 70 | return (bool) $page->getVariable('published'); |
71 | 71 | }) |
72 | 72 | // enrichs some variables |
73 | - ->map(function (Page $page) { |
|
73 | + ->map(function(Page $page) { |
|
74 | 74 | $formats = $this->getOutputFormats($page); |
75 | 75 | // output formats |
76 | 76 | $page->setVariable('output', $formats); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // renders with Twig |
126 | 126 | try { |
127 | 127 | $deprecations = []; |
128 | - set_error_handler(function ($type, $msg) use (&$deprecations) { |
|
128 | + set_error_handler(function($type, $msg) use (&$deprecations) { |
|
129 | 129 | if (E_USER_DEPRECATED === $type) { |
130 | 130 | $deprecations[] = $msg; |
131 | 131 | } |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | protected function getTranslations(Page $refPage): \Cecil\Collection\Page\Collection |
275 | 275 | { |
276 | 276 | /** @var Page $page */ |
277 | - $pages = $this->builder->getPages()->filter(function (Page $page) use ($refPage) { |
|
277 | + $pages = $this->builder->getPages()->filter(function(Page $page) use ($refPage) { |
|
278 | 278 | return $page->getId() !== $refPage->getId() |
279 | 279 | && $page->getVariable('langref') == $refPage->getVariable('langref') |
280 | 280 | && $page->getType() == $refPage->getType() |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | // add generator meta tag |
296 | 296 | if (!preg_match('/<meta name="generator".*/i', $output)) { |
297 | 297 | $meta = \sprintf('<meta name="generator" content="Cecil %s" />', Builder::getVersion()); |
298 | - $output = preg_replace_callback('/([[:blank:]]*)(<\/head>)/i', function ($matches) use ($meta) { |
|
298 | + $output = preg_replace_callback('/([[:blank:]]*)(<\/head>)/i', function($matches) use ($meta) { |
|
299 | 299 | return str_repeat($matches[1] ?: ' ', 2).$meta."\n".$matches[1].$matches[2]; |
300 | 300 | }, $output); |
301 | 301 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | //'/href="([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is', |
314 | 314 | // https://regex101.com/r/ycWMe4/1 |
315 | 315 | '/href="(\/|)([A-Za-z0-9_\.\-\/]+)\.md(\#[A-Za-z0-9\-]+)?"/is', |
316 | - function ($matches) use ($page) { |
|
316 | + function($matches) use ($page) { |
|
317 | 317 | // section spage |
318 | 318 | $hrefPattern = 'href="../%s/%s"'; |
319 | 319 | // root page |