| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | 1 | public function runGenerate(): PagesCollection |
|
| 49 | { |
||
| 50 | 1 | $this->generate(); |
|
| 51 | |||
| 52 | // set default language (e.g.: "en") if necessary |
||
| 53 | 1 | $this->generatedPages->map(function (\Cecil\Collection\Page\Page $page) { |
|
| 54 | 1 | if ($page->getVariable('language') === null) { |
|
| 55 | $page->setVariable('language', $this->config->getLanguageDefault()); |
||
| 56 | } |
||
| 57 | 1 | }); |
|
| 58 | |||
| 59 | 1 | return $this->generatedPages; |
|
| 60 | } |
||
| 62 |