@@ -119,8 +119,7 @@ |
||
| 119 | 119 | $this->url = (string) new self($this->builder, $page, $options); |
| 120 | 120 | break; |
| 121 | 121 | // asset as string |
| 122 | - case false !== strpos($value, '.') ? true : false: |
|
| 123 | - $this->url = $base.'/'.ltrim($value, '/'); |
|
| 122 | + case false !== strpos($value, '.') ? true : false : $this->url = $base.'/'.ltrim($value, '/'); |
|
| 124 | 123 | break; |
| 125 | 124 | // others cases? |
| 126 | 125 | default: |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | $this->builder = $builder; |
| 72 | 72 | $this->config = $builder->getConfig(); |
| 73 | 73 | $paths = is_array($paths) ? $paths : [$paths]; |
| 74 | - array_walk($paths, function ($path) { |
|
| 74 | + array_walk($paths, function($path) { |
|
| 75 | 75 | if (empty($path)) { |
| 76 | 76 | throw new RuntimeException('The path parameter of "asset() can\'t be empty."'); |
| 77 | 77 | } |
@@ -84,11 +84,11 @@ discard block |
||
| 84 | 84 | 'ext' => '', // file extension |
| 85 | 85 | 'type' => '', // file type (e.g.: image, audio, video, etc.) |
| 86 | 86 | 'subtype' => '', // file media type (e.g.: image/png, audio/mp3, etc.) |
| 87 | - 'size' => 0, // file size (in bytes) |
|
| 87 | + 'size' => 0, // file size (in bytes) |
|
| 88 | 88 | 'content_source' => '', // file content, before transformations |
| 89 | 89 | 'content' => '', // file content, after transformations |
| 90 | - 'width' => 0, // width (in pixels) in case of an image |
|
| 91 | - 'height' => 0, // height (in pixels) in case of an image |
|
| 90 | + 'width' => 0, // width (in pixels) in case of an image |
|
| 91 | + 'height' => 0, // height (in pixels) in case of an image |
|
| 92 | 92 | ]; |
| 93 | 93 | |
| 94 | 94 | // handles options |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | |
| 423 | 423 | try { |
| 424 | 424 | $img = ImageManager::make($assetResized->data['content_source']); |
| 425 | - $img->resize($width, null, function (\Intervention\Image\Constraint $constraint) { |
|
| 425 | + $img->resize($width, null, function(\Intervention\Image\Constraint $constraint) { |
|
| 426 | 426 | $constraint->aspectRatio(); |
| 427 | 427 | $constraint->upsize(); |
| 428 | 428 | }); |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | */ |
| 113 | 113 | public function getPages(): \Cecil\Collection\Page\Collection |
| 114 | 114 | { |
| 115 | - return $this->builder->getPages()->filter(function (CollectionPage $page) { |
|
| 115 | + return $this->builder->getPages()->filter(function(CollectionPage $page) { |
|
| 116 | 116 | // We should fix case of virtual pages without language |
| 117 | 117 | if ($page->getLanguage() === null && $this->language == $this->config->getLanguageDefault()) { |
| 118 | 118 | return true; |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $this->generate(); |
| 51 | 51 | |
| 52 | 52 | // set default language (ex: "en") if necessary |
| 53 | - $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) { |
|
| 53 | + $this->generatedPages->map(function(\Cecil\Collection\Page\Page $page) { |
|
| 54 | 54 | if ($page->getLanguage() === null) { |
| 55 | 55 | $page->setLanguage($this->config->getLanguageDefault()); |
| 56 | 56 | } |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | */ |
| 141 | 141 | protected function collectPages(): void |
| 142 | 142 | { |
| 143 | - $filteredPages = $this->builder->getPages()->filter(function (Page $page) { |
|
| 143 | + $filteredPages = $this->builder->getPages()->filter(function(Page $page) { |
|
| 144 | 144 | return $page->hasVariable('menu') |
| 145 | 145 | && $page->getVariable('published') |
| 146 | 146 | && in_array($page->getLanguage() ?? $this->config->getLanguageDefault(), array_column($this->config->getLanguages(), 'code')); |
@@ -132,7 +132,7 @@ |
||
| 132 | 132 | $buildProcess->setPty(Process::isPtySupported()); |
| 133 | 133 | $buildProcess->setTimeout(3600 * 2); // timeout = 2 minutes |
| 134 | 134 | |
| 135 | - $processOutputCallback = function ($type, $data) use ($output) { |
|
| 135 | + $processOutputCallback = function($type, $data) use ($output) { |
|
| 136 | 136 | $output->write($data, false, OutputInterface::OUTPUT_RAW); |
| 137 | 137 | }; |
| 138 | 138 | |