| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 9 | public function getCommand() |
|
| 21 | { |
||
| 22 | 9 | $packages = implode(' ', array_unique($this->packages)); |
|
| 23 | 9 | $options = implode(' ', array_unique($this->options)); |
|
| 24 | |||
| 25 | 9 | $command = "dnf {$options} {$this->action} {$packages}"; |
|
| 26 | |||
| 27 | // Remove extra whitespaces |
||
| 28 | 9 | $command = preg_replace('/\s+/', ' ', trim($command)); |
|
| 29 | |||
| 30 | 9 | return $command; |
|
| 31 | } |
||
| 32 | } |
||
| 33 |