@@ -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 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | // collect published pages |
| 54 | 54 | /* @var $page Page */ |
| 55 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 55 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 56 | 56 | return !empty($page->getVariable('published')); |
| 57 | 57 | }); |
| 58 | 58 | $max = count($filteredPages); |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $this->builder->getRenderer()->addGlobal('site', array_merge( |
| 112 | 112 | $this->config->get('site'), |
| 113 | 113 | ['menus' => $this->builder->getMenus()], |
| 114 | - ['pages' => $this->builder->getPages()->filter(function (Page $page) { |
|
| 114 | + ['pages' => $this->builder->getPages()->filter(function(Page $page) { |
|
| 115 | 115 | return $page->getVariable('published'); |
| 116 | 116 | })], |
| 117 | 117 | ['time' => time()] |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | call_user_func_array($this->builder->getMessageCb(), ['SAVE', 'Saving pages']); |
| 47 | 47 | |
| 48 | 48 | /* @var $page Page */ |
| 49 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 49 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 50 | 50 | return !empty($page->getVariable('rendered')); |
| 51 | 51 | }); |
| 52 | 52 | $max = count($filteredPages); |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | $staticDir = $this->builder->getConfig()->getStaticPath(); |
| 62 | 62 | if (Util::getFS()->exists($staticDir)) { |
| 63 | 63 | $finder = new Finder(); |
| 64 | - $finder->files()->filter(function (\SplFileInfo $file) { |
|
| 64 | + $finder->files()->filter(function(\SplFileInfo $file) { |
|
| 65 | 65 | return !(is_array($this->builder->getConfig()->get('static.exclude')) |
| 66 | 66 | && in_array($file->getBasename(), $this->builder->getConfig()->get('static.exclude'))); |
| 67 | 67 | })->in($staticDir); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $themeConfigFile = $this->config->getThemesPath().'/'.$theme.'/'.self::THEME_CONFIG_FILE; |
| 45 | 45 | if (Util::getFS()->exists($themeConfigFile)) { |
| 46 | 46 | set_error_handler( |
| 47 | - function ($severity, $message, $file, $line) { |
|
| 47 | + function($severity, $message, $file, $line) { |
|
| 48 | 48 | throw new \ErrorException($message, $severity, $severity, $file, $line); |
| 49 | 49 | } |
| 50 | 50 | ); |
@@ -20,6 +20,7 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @param string|array $templatesPath |
| 22 | 22 | * @param Builder $buider |
| 23 | + * @return void |
|
| 23 | 24 | */ |
| 24 | 25 | public function __construct($templatesPath, Builder $buider); |
| 25 | 26 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $generatedPages = new PagesCollection('generator-redirect'); |
| 25 | 25 | |
| 26 | - $filteredPages = $pagesCollection->filter(function (Page $page) { |
|
| 26 | + $filteredPages = $pagesCollection->filter(function(Page $page) { |
|
| 27 | 27 | return null !== $page->getVariable('redirect') |
| 28 | 28 | && $page->getVariable('layout') != 'redirect'; |
| 29 | 29 | }); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $paginationSections = $this->config->get('site.pagination.sections'); |
| 36 | 36 | |
| 37 | 37 | // filter pages: home and sections |
| 38 | - $filteredPages = $pagesCollection->filter(function (Page $page) { |
|
| 38 | + $filteredPages = $pagesCollection->filter(function(Page $page) { |
|
| 39 | 39 | return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION]); |
| 40 | 40 | }); |
| 41 | 41 | /* @var $page Page */ |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * |
| 39 | 39 | * @param string $string |
| 40 | 40 | * |
| 41 | - * @return string[]|null |
|
| 41 | + * @return string|null |
|
| 42 | 42 | */ |
| 43 | 43 | public static function getPrefix(string $string): ?string |
| 44 | 44 | { |