for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Zalas\Toolbox\Tool\Command;
use Zalas\Toolbox\Tool\Command;
final class PhiveInstallCommand implements Command
{
private $alias;
private $bin;
private $unsigned;
public function __construct(string $alias, string $bin, bool $unsigned)
$this->alias = $alias;
$this->bin = $bin;
$this->unsigned = $unsigned;
}
public function __toString(): string
$home = \dirname($this->bin);
$tmp = \md5($this->alias);
return \sprintf(
'echo "y" | phive --no-progress --home %s install %s %s -t %s && mv %s/* %s',
$home,
$this->unsigned ? '--force-accept-unsigned' : '',
$this->alias,
$tmp,
$this->bin
);