Total Complexity | 5 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class viglink extends \phpbb\cron\task\base |
||
17 | { |
||
18 | /** @var \phpbb\config\config $config Config object */ |
||
19 | protected $config; |
||
20 | |||
21 | /** @var \phpbb\viglink\acp\viglink_helper $helper Viglink helper object */ |
||
22 | protected $helper; |
||
23 | |||
24 | /** |
||
25 | * Constructor |
||
26 | * |
||
27 | * @param \phpbb\config\config $config Config object |
||
28 | * @param \phpbb\viglink\acp\viglink_helper $viglink_helper Viglink helper object |
||
29 | * @access public |
||
30 | */ |
||
31 | public function __construct(\phpbb\config\config $config, \phpbb\viglink\acp\viglink_helper $viglink_helper) |
||
32 | { |
||
33 | $this->config = $config; |
||
34 | $this->helper = $viglink_helper; |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * {@inheritDoc} |
||
39 | */ |
||
40 | public function run() |
||
41 | { |
||
42 | try |
||
43 | { |
||
44 | $this->helper->set_viglink_services(true); |
||
45 | } |
||
46 | catch (\RuntimeException $e) |
||
47 | { |
||
48 | $this->helper->log_viglink_error($e->getMessage()); |
||
49 | } |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * {@inheritDoc} |
||
54 | */ |
||
55 | public function is_runnable() |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * {@inheritDoc} |
||
62 | */ |
||
63 | public function should_run() |
||
68 |