| Total Complexity | 3 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class autogroups_check extends \phpbb\cron\task\base |
||
|
|
|||
| 17 | { |
||
| 18 | /** @var \phpbb\config\config */ |
||
| 19 | protected $config; |
||
| 20 | |||
| 21 | /** @var \phpbb\autogroups\conditions\manager */ |
||
| 22 | protected $manager; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor |
||
| 26 | * |
||
| 27 | * @param \phpbb\config\config $config Config object |
||
| 28 | * @param \phpbb\autogroups\conditions\manager $manager Auto groups condition manager object |
||
| 29 | * @access public |
||
| 30 | */ |
||
| 31 | public function __construct(\phpbb\config\config $config, \phpbb\autogroups\conditions\manager $manager) |
||
| 32 | { |
||
| 33 | $this->config = $config; |
||
| 34 | $this->manager = $manager; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Runs this cron task. |
||
| 39 | * |
||
| 40 | * @return void |
||
| 41 | */ |
||
| 42 | public function run() |
||
| 43 | { |
||
| 44 | $this->manager->check_conditions(); |
||
| 45 | $this->config->set('autogroups_last_run', time(), false); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Returns whether this cron task should run now, because enough time |
||
| 50 | * has passed since it was last run (24 hours). |
||
| 51 | * |
||
| 52 | * @return bool |
||
| 53 | */ |
||
| 54 | public function should_run() |
||
| 57 | } |
||
| 58 | } |
||
| 59 |
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