| Total Complexity | 11 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Composer |
||
| 6 | { |
||
| 7 | public function __construct(string $dir) |
||
| 8 | { |
||
| 9 | $this->dir = ($dir === getcwd() ? '' : $dir); |
||
|
|
|||
| 10 | } |
||
| 11 | |||
| 12 | public function autoload() |
||
| 19 | } |
||
| 20 | |||
| 21 | public function dump() |
||
| 24 | } |
||
| 25 | |||
| 26 | public function run(string $command, array $args = []) |
||
| 27 | { |
||
| 28 | sys::passthru("{$this->getCmd()} $command"); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getCmd(): string |
||
| 32 | { |
||
| 33 | return 'composer' . ($this->dir ? " -d $dir" : ''); |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getPath(string $file): string |
||
| 43 | } |
||
| 44 | } |
||
| 45 |