Total Complexity | 5 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | class CachedPages extends Report |
||
12 | { |
||
13 | public function title() |
||
14 | { |
||
15 | return 'Pages with caching'; |
||
16 | } |
||
17 | |||
18 | public function group() |
||
19 | { |
||
20 | return _t(__CLASS__ . '.ContentGroupTitle', "Content reports"); |
||
21 | } |
||
22 | |||
23 | public function sort() |
||
24 | { |
||
25 | return 100; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * Gets the source records |
||
30 | * |
||
31 | * @param array $params |
||
32 | * @return DataList<SiteTree> |
||
33 | */ |
||
34 | public function sourceRecords($params = null) |
||
35 | { |
||
36 | return Page::get() |
||
37 | ->filter(['PublicCacheDurationInSeconds:GreaterThan' => 0, 'NeverCachePublicly' => 0]); |
||
38 | } |
||
39 | |||
40 | public function columns() |
||
57 | }, |
||
58 | ], |
||
59 | ]; |
||
60 | } |
||
61 | } |
||
62 |
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