@@ -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); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function filterBy($pages, $variable, $value) |
| 115 | 115 | { |
| 116 | - $filteredPages = $pages->filter(function (Page $page) use ($variable, $value) { |
|
| 116 | + $filteredPages = $pages->filter(function(Page $page) use ($variable, $value) { |
|
| 117 | 117 | // dedicated getter? |
| 118 | 118 | $method = 'get'.ucfirst($variable); |
| 119 | 119 | if (method_exists($page, $method) && $page->$method() == $value) { |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function sortByWeight($array) |
| 157 | 157 | { |
| 158 | - $callback = function ($a, $b) { |
|
| 158 | + $callback = function($a, $b) { |
|
| 159 | 159 | if (!isset($a['weight'])) { |
| 160 | 160 | return 1; |
| 161 | 161 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | */ |
| 189 | 189 | public function sortByDate($array) |
| 190 | 190 | { |
| 191 | - $callback = function ($a, $b) { |
|
| 191 | + $callback = function($a, $b) { |
|
| 192 | 192 | if (!isset($a['date'])) { |
| 193 | 193 | return -1; |
| 194 | 194 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @param PageCollection $pages |
| 95 | 95 | * @param string $section |
| 96 | 96 | * |
| 97 | - * @return array |
|
| 97 | + * @return CollectionInterface |
|
| 98 | 98 | */ |
| 99 | 99 | public function filterBySection($pages, $section) |
| 100 | 100 | { |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * |
| 111 | 111 | * @throws Exception |
| 112 | 112 | * |
| 113 | - * @return array |
|
| 113 | + * @return CollectionInterface |
|
| 114 | 114 | */ |
| 115 | 115 | public function filterBy($pages, $variable, $value) |
| 116 | 116 | { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * Implement ArrayAccess. |
| 70 | 70 | * |
| 71 | - * @param mixed $offset |
|
| 71 | + * @param string $offset |
|
| 72 | 72 | * |
| 73 | 73 | * @return null |
| 74 | 74 | */ |
@@ -80,8 +80,8 @@ discard block |
||
| 80 | 80 | /** |
| 81 | 81 | * Implement ArrayAccess. |
| 82 | 82 | * |
| 83 | - * @param mixed $offset |
|
| 84 | - * @param mixed $value |
|
| 83 | + * @param string $offset |
|
| 84 | + * @param string $value |
|
| 85 | 85 | */ |
| 86 | 86 | public function offsetSet($offset, $value) |
| 87 | 87 | { |
@@ -169,7 +169,7 @@ |
||
| 169 | 169 | */ |
| 170 | 170 | public function usort(\Closure $callback = null): CollectionInterface |
| 171 | 171 | { |
| 172 | - $callback ? uasort($this->items, $callback) : uasort($this->items, function ($a, $b) { |
|
| 172 | + $callback ? uasort($this->items, $callback) : uasort($this->items, function($a, $b) { |
|
| 173 | 173 | if ($a == $b) { |
| 174 | 174 | return 0; |
| 175 | 175 | } |
@@ -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 | } |
@@ -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 | } |