Total Complexity | 5 |
Total Lines | 60 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | class blocks_cleanup extends \phpbb\cron\task\base |
||
13 | { |
||
14 | /** @var \phpbb\config\config */ |
||
15 | protected $config; |
||
16 | |||
17 | /** @var \blitze\sitemaker\services\blocks\cleaner_inteface */ |
||
|
|||
18 | protected $cleaner; |
||
19 | |||
20 | /** |
||
21 | * Constructor |
||
22 | * |
||
23 | * @param \phpbb\config\config $config Config object |
||
24 | */ |
||
25 | public function __construct(\phpbb\config\config $config) |
||
26 | { |
||
27 | $this->config = $config; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * We do this instead of the constructor injection to avoid circular reference |
||
32 | * since phpBB controller.helper service now has a dependency on cron.manager |
||
33 | * |
||
34 | * @param \blitze\sitemaker\services\blocks\cleaner_interface $cleaner |
||
35 | */ |
||
36 | public function set_cleaner(\blitze\sitemaker\services\blocks\cleaner_interface $cleaner) |
||
37 | { |
||
38 | $this->cleaner = $cleaner; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | 2 | * Runs this cron task. |
|
43 | * |
||
44 | 2 | * @return void |
|
45 | 2 | */ |
|
46 | 2 | public function run() |
|
51 | } |
||
52 | |||
53 | /** |
||
54 | * Returns whether this cron task can run, given current board configuration. |
||
55 | * |
||
56 | * @return bool |
||
57 | 1 | */ |
|
58 | public function is_runnable() |
||
61 | 1 | } |
|
62 | 1 | ||
63 | 1 | /** |
|
64 | 1 | * Returns whether this cron task should run now, because enough time |
|
65 | 1 | * has passed since it was last run. |
|
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function should_run() |
||
74 |
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