Total Complexity | 3 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
9 | abstract class AbstractSystem implements SystemInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var boolean $runStatus To know if the run method has been called |
||
13 | */ |
||
14 | protected $runStatus = false; |
||
15 | |||
16 | /** |
||
17 | * PHP Magic method |
||
18 | * Called when the class is called like a function |
||
19 | * |
||
20 | * @return mixed |
||
21 | */ |
||
22 | abstract public function __invoke(); |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function toRun(): bool |
||
28 | { |
||
29 | return false; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function isRun(): bool |
||
36 | { |
||
37 | return $this->runStatus; |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | * Should change runStatus to true. |
||
43 | */ |
||
44 | public function run() |
||
47 | } |
||
48 | } |
||
49 |