public function validate()
    {
        if ($this->binary === false) {
            throw new CommandException("Command not found.");
        }

        if (!is_executable($this->binary)) {
            throw new CommandException("$this not executable.");
        }

        $nargs = false;
        foreach ($this->options as $option => $value) {
            if (is_array($value)) {
                if ($nargs) {
                    throw new CommandException("Multiple nargs detected.");
                }

                $nargs = true;
            }
        }
    }
public function validate()
    {
        if ($this->binary === false) {
            throw new CommandException("Command not found.");
        }

        if (!is_executable($this->binary)) {
            throw new CommandException("$this not executable.");
        }

        $nargs = false;
        foreach ($this->options as $option => $value) {
            if (is_array($value)) {
                if ($nargs) {
                    throw new CommandException("Multiple nargs detected.");
                }

                $nargs = true;
            }
        }
    }
public function validate ( ) { if ( $ this -> binary === false ) { throw new CommandException ( "Command not found." ) ; } if ( ! is_executable ( $ this -> binary ) ) { throw new CommandException ( "$this not executable." ) ; } $ nargs = false ; foreach ( $ this -> options as $ option => $ value ) { if ( is_array ( $ value ) ) { if ( $ nargs ) { throw new CommandException ( "Multiple nargs detected." ) ; } $ nargs = true ; } } }
Verify the command binary.

@return void
@throws CommandException
Verify the command binary .