diff --git a/class-ShellCommand.php b/class-ShellCommand.php deleted file mode 100644 index 26fef15..0000000 --- a/class-ShellCommand.php +++ /dev/null @@ -1,50 +0,0 @@ -. - -class ShellCommand { - private $prefix; - private $args; - - function __construct( $prefix, $args = [] ) { - $this->prefix = $prefix; - $this->args = $args; - } - - static function factory( $prefix, $args = [] ) { - return new self( $prefix, $args ); - } - - function arg($arg) { - $this->args[] = $arg; - return $this; - } - - function getArgs() { - $args = []; - foreach( $this->args as $arg ) { - $args[] = self::sanitize( $arg ); - } - return implode(' ', $args); - } - - function get() { - return $this->prefix . ' ' . $this->getArgs(); - } - - static private function sanitize( $s ) { - return escapeshellarg( $s ); - } -}