| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class InstallTask extends AbstractComposerTask |
||
| 22 | { |
||
| 23 | 48 | public function getName(): string |
|
| 24 | { |
||
| 25 | 48 | return 'composer/install'; |
|
| 26 | } |
||
| 27 | |||
| 28 | 29 | public function getDescription(): string |
|
| 29 | { |
||
| 30 | 29 | return '[Composer] Install'; |
|
| 31 | } |
||
| 32 | |||
| 33 | 28 | public function execute(): bool |
|
| 34 | { |
||
| 35 | 28 | $options = $this->getOptions(); |
|
| 36 | 28 | $cmd = sprintf('%s install %s', $options['path'], $options['flags']); |
|
| 37 | |||
| 38 | /** @var Process $process */ |
||
| 39 | 28 | $process = $this->runtime->runCommand(trim($cmd), intval($options['timeout'])); |
|
| 40 | |||
| 41 | 28 | return $process->isSuccessful(); |
|
| 42 | } |
||
| 43 | |||
| 44 | 28 | protected function getComposerOptions(): array |
|
| 47 | } |
||
| 48 | } |
||
| 49 |