| Total Complexity | 4 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class CwpSearchPageController extends PageController |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Create the dummy search record for this page |
||
| 16 | * |
||
| 17 | * @return CwpSearchPage |
||
| 18 | */ |
||
| 19 | protected function generateSearchRecord() |
||
| 20 | { |
||
| 21 | $searchPage = CwpSearchPage::create(); |
||
| 22 | $searchPage->URLSegment = 'search'; |
||
| 23 | $searchPage->Title = _t('SilverStripe\\CMS\\Search\\SearchForm.SearchResults', 'Search Results'); |
||
| 24 | $searchPage->ID = -1; |
||
| 25 | return $searchPage; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function __construct($dataRecord = null) |
||
| 29 | { |
||
| 30 | if (!$dataRecord) { |
||
| 31 | $dataRecord = $this->generateSearchRecord(); |
||
| 32 | } |
||
| 33 | parent::__construct($dataRecord); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function index() |
||
| 39 | } |
||
| 40 | } |
||
| 41 |
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