| Total Complexity | 3 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class ComposerGlobalMultiInstallCommand implements Command |
||
| 10 | { |
||
| 11 | private Collection $commands; |
||
| 12 | |||
| 13 | 4 | public function __construct(Collection $commands) |
|
| 14 | { |
||
| 15 | 4 | if ($commands->empty()) { |
|
| 16 | 1 | throw new InvalidArgumentException('Collection of composer global install commands cannot be empty.'); |
|
| 17 | } |
||
| 18 | |||
| 19 | 3 | $this->commands = $commands->filter(function (ComposerGlobalInstallCommand $c) { |
|
| 20 | 3 | return $c; |
|
| 21 | 3 | }); |
|
| 22 | } |
||
| 23 | |||
| 24 | 2 | public function __toString(): string |
|
| 31 | } |
||
| 32 | } |
||
| 33 |