protected function assembleOptionString()
    {
        $optionString = '';

        foreach ($this->options as $name => $option) {
            if ($option === true) {
                $optionString .= " {$name}";
            } elseif (is_string($option) && $option !== '') {
                $optionString .= " {$name} " . escapeshellarg($option);
            } elseif (is_array($option) && !empty($option)) {
                $optionString .= " {$name} " . implode(' ', $option);
            }
        }

        return $optionString !== '' ? $optionString . '' : ' ';
    }