1 | <?php |
||
16 | class Installing extends Task |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | private $modules = [ |
||
22 | 'git' => [ |
||
23 | 'package' => 'raphhh/samurai-module-git', |
||
24 | 'version' => '', |
||
25 | ], |
||
26 | 'cleaner' => [ |
||
27 | 'package' => 'raphhh/samurai-module-cleaner', |
||
28 | 'version' => '', |
||
29 | ], |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * @param InputInterface $input |
||
34 | * @param OutputInterface $output |
||
35 | * @return int|null |
||
36 | */ |
||
37 | 5 | public function execute(InputInterface $input, OutputInterface $output) |
|
49 | |||
50 | /** |
||
51 | * @param InputInterface $input |
||
52 | * @param OutputInterface $output |
||
53 | * @return int|null |
||
54 | */ |
||
55 | 4 | private function installModules(InputInterface $input, OutputInterface $output) |
|
74 | |||
75 | /** |
||
76 | * @param InputInterface $input |
||
77 | * @param OutputInterface $output |
||
78 | * @param string $modulePackage |
||
79 | * @return bool |
||
80 | */ |
||
81 | 3 | private function confirmInstall(InputInterface $input, OutputInterface $output, $modulePackage) |
|
89 | |||
90 | /** |
||
91 | * @param string $modulePackage |
||
92 | * @return ConfirmationQuestion |
||
93 | */ |
||
94 | 4 | private function buildQuestion($modulePackage) |
|
103 | |||
104 | /** |
||
105 | * @param $name |
||
106 | * @param array $moduleData |
||
107 | * @return Module |
||
108 | */ |
||
109 | 2 | private function buildModule($name, array $moduleData) |
|
118 | |||
119 | /** |
||
120 | * @param $input |
||
121 | * @param $output |
||
122 | * @return bool |
||
123 | */ |
||
124 | 1 | private function installModule($input, $output) |
|
129 | } |
||
130 |