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