| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function getCalculatedAnswer(): array |
||
| 17 | { |
||
| 18 | $pageTypes = ClassInfo::subclassesFor(SiteTree::class, false); |
||
| 19 | $array = []; |
||
| 20 | foreach ($pageTypes as $pageType) { |
||
| 21 | $pages = Versioned::get_by_stage( |
||
| 22 | $pageType, // class, |
||
| 23 | Versioned::LIVE, // stage, |
||
| 24 | '', // filter = '', |
||
| 25 | DB::get_conn()->random(), // sort = '', |
||
| 26 | '', // join = '', |
||
| 27 | $this->config()->get('limit') // limit |
||
| 28 | ); |
||
| 29 | |||
| 30 | $array[] = [ |
||
| 31 | 'Name' => Injector::inst()->get($pageType)->i18n_singular_name(), |
||
| 32 | 'Count' => $pageType::get()->count(), |
||
| 33 | 'Examples' => $this->turnPagesIntoArray($pages), |
||
| 34 | ]; |
||
| 35 | } |
||
| 36 | return $array; |
||
| 37 | } |
||
| 46 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths