Total Complexity | 6 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Watchmaker |
||
9 | { |
||
10 | private static $config; |
||
11 | private $taskList = []; |
||
12 | |||
13 | public function __construct(Config $config) |
||
14 | { |
||
15 | self::$config = $config; |
||
16 | } |
||
17 | |||
18 | public function task($command = '') |
||
19 | { |
||
20 | return new WatchmakerCore($command); |
||
21 | } |
||
22 | |||
23 | public function add(WatchmakerCore $kairos) |
||
24 | { |
||
25 | $this->taskList[] = $kairos; |
||
26 | } |
||
27 | |||
28 | public function show() |
||
29 | { |
||
30 | $show = new Show(); |
||
31 | |||
32 | return $show->execute($this->taskList); |
||
33 | } |
||
34 | |||
35 | public function install() |
||
36 | { |
||
37 | $install = new Install(); |
||
38 | |||
39 | return $install->execute($this->taskList); |
||
40 | } |
||
41 | |||
42 | public static function getConfig() : Config |
||
45 | } |
||
46 | } |
||
47 |