public function addArgument($arg, $unique = false)
    {
        if (!is_scalar($arg)) {
            throw new InvalidArgumentException('scalar', 0);
        }

        // escape arguments with spaces
        if (strpos($arg, ' ') !== false && (strpos($arg, '"') === false) ) {
            $arg = "\"$arg\"";
        }

        if (in_array($arg, $this->arguments) && $unique) {
            return $this;
        }

        $this->arguments[] = $arg;

        return $this;
    }