| Total Complexity | 6 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | final class ComposerBinPluginCommand implements Command |
||
| 9 | { |
||
| 10 | private string $package; |
||
| 11 | |||
| 12 | private string $namespace; |
||
| 13 | |||
| 14 | private Collection $links; |
||
| 15 | |||
| 16 | 18 | public function __construct(string $package, string $namespace, Collection $links) |
|
| 21 | } |
||
| 22 | |||
| 23 | 3 | public function __toString(): string |
|
| 24 | { |
||
| 25 | 3 | return \sprintf('composer global bin %s require --prefer-dist --update-no-dev -n %s%s', $this->namespace, $this->package, $this->linkCommand()); |
|
| 26 | } |
||
| 27 | |||
| 28 | 6 | public function package(): string |
|
| 29 | { |
||
| 30 | 6 | return $this->package; |
|
| 31 | } |
||
| 32 | |||
| 33 | 6 | public function namespace(): string |
|
| 34 | { |
||
| 35 | 6 | return $this->namespace; |
|
| 36 | } |
||
| 37 | |||
| 38 | 7 | public function links(): Collection |
|
| 41 | } |
||
| 42 | |||
| 43 | 3 | private function linkCommand(): string |
|
| 44 | { |
||
| 50 |