| Conditions | 5 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | 5 | public function create($packageManager) |
|
| 23 | { |
||
| 24 | switch ($packageManager) { |
||
| 25 | 5 | case 'apt': |
|
| 26 | 1 | return new CommandBuilder\AptCommandBuilder(); |
|
| 27 | 4 | case 'dnf': |
|
| 28 | 1 | return new CommandBuilder\DnfCommandBuilder(); |
|
| 29 | 3 | case 'pacman': |
|
| 30 | 1 | return new CommandBuilder\PacmanCommandBuilder(); |
|
| 31 | 2 | case 'yum': |
|
| 32 | 1 | return new CommandBuilder\YumCommandBuilder(); |
|
| 33 | default: |
||
| 34 | 1 | throw new \Exception('Not supported'); |
|
| 35 | } |
||
| 36 | } |
||
| 37 | } |
||
| 38 |