@@ -179,7 +179,7 @@ |
||
| 179 | 179 | */ |
| 180 | 180 | public function messageCallback(OutputInterface $output) |
| 181 | 181 | { |
| 182 | - return function ($code, $message = '', $itemsCount = 0, $itemsMax = 0) use ($output) { |
|
| 182 | + return function($code, $message = '', $itemsCount = 0, $itemsMax = 0) use ($output) { |
|
| 183 | 183 | if (strpos($code, '_PROGRESS') !== false) { |
| 184 | 184 | if ($output->isVerbose()) { |
| 185 | 185 | if ($itemsCount > 0) { |
@@ -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 | ); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $dataDir = (string) $this->getBuilder($output)->getConfig()->get('data.dir'); |
| 48 | 48 | |
| 49 | 49 | // format output |
| 50 | - $unicodeTreePrefix = function (RecursiveTreeIterator $tree) { |
|
| 50 | + $unicodeTreePrefix = function(RecursiveTreeIterator $tree) { |
|
| 51 | 51 | $prefixParts = [ |
| 52 | 52 | RecursiveTreeIterator::PREFIX_LEFT => ' ', |
| 53 | 53 | RecursiveTreeIterator::PREFIX_MID_HAS_NEXT => '│ ', |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | // filter pages: home, sections and terms |
| 30 | - $filteredPages = $this->pagesCollection->filter(function (Page $page) { |
|
| 30 | + $filteredPages = $this->pagesCollection->filter(function(Page $page) { |
|
| 31 | 31 | return in_array($page->getType(), [Type::HOMEPAGE, Type::SECTION, Type::TERM]); |
| 32 | 32 | }); |
| 33 | 33 | /** @var Page $page */ |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $message = sprintf('"%s" theme: no config file', $theme); |
| 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, 0, $severity, $file, $line, null); |
| 49 | 49 | } |
| 50 | 50 | ); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function all(): self |
| 22 | 22 | { |
| 23 | - $filteredPages = $this->filter(function (Page $page) { |
|
| 23 | + $filteredPages = $this->filter(function(Page $page) { |
|
| 24 | 24 | if ($page->isVirtual() === false) { |
| 25 | 25 | return true; |
| 26 | 26 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | */ |
| 37 | 37 | public function sortByDate(): self |
| 38 | 38 | { |
| 39 | - return $this->usort(function ($a, $b) { |
|
| 39 | + return $this->usort(function($a, $b) { |
|
| 40 | 40 | if (!isset($a['date'])) { |
| 41 | 41 | return -1; |
| 42 | 42 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function sortByTitle(): self |
| 60 | 60 | { |
| 61 | - return $this->usort(function ($a, $b) { |
|
| 61 | + return $this->usort(function($a, $b) { |
|
| 62 | 62 | return strnatcmp($a['title'], $b['title']); |
| 63 | 63 | }); |
| 64 | 64 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function sortByWeight(): self |
| 72 | 72 | { |
| 73 | - return $this->usort(function ($a, $b) { |
|
| 73 | + return $this->usort(function($a, $b) { |
|
| 74 | 74 | if (!isset($a['weight'])) { |
| 75 | 75 | return 1; |
| 76 | 76 | } |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | // image object |
| 95 | 95 | try { |
| 96 | 96 | $img = ImageManager::make($this->source); |
| 97 | - $img->resize($this->size, null, function (\Intervention\Image\Constraint $constraint) { |
|
| 97 | + $img->resize($this->size, null, function(\Intervention\Image\Constraint $constraint) { |
|
| 98 | 98 | $constraint->aspectRatio(); |
| 99 | 99 | $constraint->upsize(); |
| 100 | 100 | }); |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | public function setMessageCallback(\Closure $messageCallback = null) |
| 313 | 313 | { |
| 314 | 314 | if ($messageCallback === null) { |
| 315 | - $messageCallback = function ($code, $message = '', $itemsCount = 0, $itemsMax = 0) { |
|
| 315 | + $messageCallback = function($code, $message = '', $itemsCount = 0, $itemsMax = 0) { |
|
| 316 | 316 | switch ($code) { |
| 317 | 317 | case 'CONFIG': |
| 318 | 318 | case 'LOCATE': |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | public function getLog(int $type = 0): ?array |
| 417 | 417 | { |
| 418 | 418 | if (is_array($this->log)) { |
| 419 | - return array_filter($this->log, function ($key) use ($type) { |
|
| 419 | + return array_filter($this->log, function($key) use ($type) { |
|
| 420 | 420 | return $key['type'] <= $type; |
| 421 | 421 | }); |
| 422 | 422 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | */ |
| 112 | 112 | public function getPages(): \Cecil\Collection\Page\Collection |
| 113 | 113 | { |
| 114 | - return $this->builder->getPages()->filter(function (Page $page) { |
|
| 114 | + return $this->builder->getPages()->filter(function(Page $page) { |
|
| 115 | 115 | return $page->getVariable('published'); |
| 116 | 116 | }); |
| 117 | 117 | } |