for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of RoboSystemPackage.
*
* @author Aitor García Martínez (Falc) <[email protected]>
* @copyright 2015 Aitor García Martínez (Falc) <[email protected]>
* @license MIT
*/
namespace Falc\Robo\Package\CommandBuilder;
* Dnf command builder.
class DnfCommandBuilder extends YumCommandBuilder
{
* {@inheritdoc}
public function getCommand()
$packages = implode(' ', array_unique($this->packages));
$options = implode(' ', array_unique($this->options));
$command = "dnf {$options} {$this->action} {$packages}";
// Remove extra whitespaces
$command = preg_replace('/\s+/', ' ', trim($command));
return $command;
}