| Total Complexity | 6 |
| Total Lines | 67 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class GrumPhpInstaller implements InstallerInterface |
||
| 14 | { |
||
| 15 | /** @var JsonFile */ |
||
| 16 | private $file; |
||
| 17 | |||
| 18 | /** @var IOInterface */ |
||
| 19 | private $io; |
||
| 20 | |||
| 21 | /** @var string */ |
||
| 22 | private $destination; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Constructor. |
||
| 26 | * |
||
| 27 | * @param IOInterface|null $io |
||
| 28 | * @param JsonFile $file |
||
| 29 | * @param string|null $destination |
||
| 30 | */ |
||
| 31 | public function __construct( |
||
| 32 | IOInterface $io, |
||
| 33 | JsonFile $file = null, |
||
| 34 | string $destination = null |
||
| 35 | ) { |
||
| 36 | $this->file = $file; |
||
| 37 | $this->io = $io; |
||
| 38 | $this->file = $file ?? new JsonFile(Factory::getComposerFile()); |
||
| 39 | $this->destination = $destination ?? getcwd(); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Install. |
||
| 44 | * |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function install() |
||
| 80 | ); |
||
| 81 | } |
||
| 83 |