Conditions | 6 |
Paths | 5 |
Total Lines | 27 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function showpage($request) { |
||
30 | $id = (int) $request->param('ID'); |
||
31 | if(!$id) { |
||
32 | return false; |
||
33 | } |
||
34 | $page = SiteTree::get()->byId($id); |
||
35 | |||
36 | // does the page exist? |
||
37 | if(!($page && $page->exists())) { |
||
38 | return $this->httpError(404); |
||
39 | } |
||
40 | |||
41 | // can the page be viewed? |
||
42 | if(!$page->canView()) { |
||
43 | return $this->httpError(403); |
||
44 | } |
||
45 | |||
46 | $viewer = $this->customise(array( |
||
47 | 'IsAjax' => $request->isAjax(), |
||
48 | 'SelectedPage' => $page, |
||
49 | 'Children' => $page->Children() |
||
50 | )); |
||
51 | |||
52 | if($request->isAjax()) { |
||
53 | return $viewer->renderWith('SitemapNodeChildren'); |
||
54 | } else { |
||
55 | return $viewer; |
||
56 | } |
||
60 |
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