| Total Complexity | 2 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Composer extends BaseComposer |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Install a package. |
||
| 13 | * |
||
| 14 | * @param string $package |
||
| 15 | * @param callable $callback |
||
| 16 | * |
||
| 17 | * @return int |
||
| 18 | */ |
||
| 19 | public function install(string $package, callable $callback): int |
||
| 20 | { |
||
| 21 | return $this->getProcess() |
||
| 22 | ->setCommandLine($this->findComposer().' require '.$package) |
||
| 23 | ->run($callback); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Determine if package already installed. |
||
| 28 | * |
||
| 29 | * @param string $package |
||
| 30 | * |
||
| 31 | * @return bool |
||
| 32 | * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException |
||
| 33 | */ |
||
| 34 | public function installed(string $package): bool |
||
| 43 | } |
||
| 44 | } |
||
| 45 |