@@ -23,7 +23,7 @@ |
||
| 23 | 23 | { |
| 24 | 24 | $generatedPages = new PageCollection(); |
| 25 | 25 | |
| 26 | - $filteredPages = $pageCollection->filter(function (Page $page) { |
|
| 26 | + $filteredPages = $pageCollection->filter(function(Page $page) { |
|
| 27 | 27 | return null !== $page->getVariable('redirect'); |
| 28 | 28 | }); |
| 29 | 29 | |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | { |
| 25 | 25 | $generatedPages = new PageCollection(); |
| 26 | 26 | |
| 27 | - $filteredPages = $pageCollection->filter(function (Page $page) { |
|
| 27 | + $filteredPages = $pageCollection->filter(function(Page $page) { |
|
| 28 | 28 | return in_array($page->getNodeType(), [NodeType::HOMEPAGE, NodeType::SECTION]); |
| 29 | 29 | }); |
| 30 | 30 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | $generatedPages = new PageCollection(); |
| 26 | 26 | |
| 27 | 27 | if (!$pageCollection->has('index')) { |
| 28 | - $filteredPages = $pageCollection->filter(function (Page $page) { |
|
| 28 | + $filteredPages = $pageCollection->filter(function(Page $page) { |
|
| 29 | 29 | return $page->getNodeType() === null |
| 30 | 30 | && $page->getSection() == $this->config->get('site.paginate.homepage.section') |
| 31 | 31 | && !empty($page->getBody()); |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | public function usort(\Closure $callback = null) |
| 167 | 167 | { |
| 168 | 168 | $items = $this->items; |
| 169 | - $callback ? uasort($items, $callback) : uasort($items, function ($a, $b) { |
|
| 169 | + $callback ? uasort($items, $callback) : uasort($items, function($a, $b) { |
|
| 170 | 170 | if ($a == $b) { |
| 171 | 171 | return 0; |
| 172 | 172 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | */ |
| 185 | 185 | public function sortByDate() |
| 186 | 186 | { |
| 187 | - return $this->usort(function ($a, $b) { |
|
| 187 | + return $this->usort(function($a, $b) { |
|
| 188 | 188 | if (!isset($a['date'])) { |
| 189 | 189 | return -1; |
| 190 | 190 | } |
@@ -128,7 +128,7 @@ |
||
| 128 | 128 | // file as a prefix? |
| 129 | 129 | if (false !== self::getPrefix($this->fileId)) { |
| 130 | 130 | // prefix is a valid date? |
| 131 | - $isValidDate = function ($date, $format = 'Y-m-d') { |
|
| 131 | + $isValidDate = function($date, $format = 'Y-m-d') { |
|
| 132 | 132 | $d = \DateTime::createFromFormat($format, $date); |
| 133 | 133 | |
| 134 | 134 | return $d && $d->format($format) === $date; |
@@ -173,9 +173,9 @@ discard block |
||
| 173 | 173 | /** |
| 174 | 174 | * Return prefix if prefix or false. |
| 175 | 175 | * |
| 176 | - * @param $string |
|
| 176 | + * @param string $string |
|
| 177 | 177 | * |
| 178 | - * @return string[]|false |
|
| 178 | + * @return string|false |
|
| 179 | 179 | */ |
| 180 | 180 | public static function getPrefix($string) |
| 181 | 181 | { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | /** |
| 190 | 190 | * Return string without prefix (if exist). |
| 191 | 191 | * |
| 192 | - * @param $string |
|
| 192 | + * @param string $string |
|
| 193 | 193 | * |
| 194 | 194 | * @return string |
| 195 | 195 | */ |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | /** |
| 369 | 369 | * Set title. |
| 370 | 370 | * |
| 371 | - * @param $title |
|
| 371 | + * @param string $title |
|
| 372 | 372 | * |
| 373 | 373 | * @return $this |
| 374 | 374 | */ |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | /** |
| 417 | 417 | * Set weight. |
| 418 | 418 | * |
| 419 | - * @param $int |
|
| 419 | + * @param string|false $int |
|
| 420 | 420 | * |
| 421 | 421 | * @return $this |
| 422 | 422 | */ |
@@ -440,7 +440,7 @@ discard block |
||
| 440 | 440 | /** |
| 441 | 441 | * Set permalink. |
| 442 | 442 | * |
| 443 | - * @param $permalink |
|
| 443 | + * @param string $permalink |
|
| 444 | 444 | * |
| 445 | 445 | * @return $this |
| 446 | 446 | */ |
@@ -142,7 +142,7 @@ |
||
| 142 | 142 | /** |
| 143 | 143 | * Apply environment variables. |
| 144 | 144 | */ |
| 145 | - $applyEnv = function ($array) use ($data) { |
|
| 145 | + $applyEnv = function($array) use ($data) { |
|
| 146 | 146 | $iterator = new \RecursiveIteratorIterator( |
| 147 | 147 | new \RecursiveArrayIterator($array), |
| 148 | 148 | \RecursiveIteratorIterator::SELF_FIRST |
@@ -17,6 +17,7 @@ |
||
| 17 | 17 | * Give config to object. |
| 18 | 18 | * |
| 19 | 19 | * @param \Cecil\Config $config |
| 20 | + * @return void |
|
| 20 | 21 | */ |
| 21 | 22 | public function __construct(\Cecil\Config $config); |
| 22 | 23 | |
@@ -16,6 +16,7 @@ |
||
| 16 | 16 | * StepInterface constructor. |
| 17 | 17 | * |
| 18 | 18 | * @param Builder $builder |
| 19 | + * @return void |
|
| 19 | 20 | */ |
| 20 | 21 | public function __construct(Builder $builder); |
| 21 | 22 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | if ($this->process) { |
| 34 | 34 | $generatorManager = new GeneratorManager(); |
| 35 | 35 | $generators = $this->builder->getConfig()->get('generators'); |
| 36 | - array_walk($generators, function ($generator, $priority) use ($generatorManager) { |
|
| 36 | + array_walk($generators, function($generator, $priority) use ($generatorManager) { |
|
| 37 | 37 | if (!class_exists($generator)) { |
| 38 | 38 | $message = sprintf("Unable to load generator '%s'", $generator); |
| 39 | 39 | call_user_func_array($this->builder->getMessageCb(), ['GENERATE_ERROR', $message]); |