src/Service.php
public static function parseSignature(string $signature): array
    {
        /* Parse Signature to Array */
        $signature = explode(' ', trim($signature));

        /* Initialize */
        $command = trim($signature[0]);
        $arguments = [];
        $options = [];

        /* Check Each Word */
        foreach ($signature as $word) {
            $type = self::determineTypeOfWord($word);

            /* Option */
            if ($type == self::OPTION_TYPE) {
                list($key, $defaultValue) = self::parse($word);
                $options[$key] = $defaultValue;
            }

            /* Argument */
            elseif ($type == self::ARGUMENT_TYPE) {
                list($key, $defaultValue) = self::parse($word);
                $arguments[$key] = $defaultValue;
            }
        }

        return [$command, $arguments, $options];
    }
public static function parseSignature(string $signature): array
    {
        /* Parse Signature to Array */
        $signature = explode(' ', trim($signature));

        /* Initialize */
        $command = trim($signature[0]);
        $arguments = [];
        $options = [];

        /* Check Each Word */
        foreach ($signature as $word) {
            $type = self::determineTypeOfWord($word);

            /* Option */
            if ($type == self::OPTION_TYPE) {
                list($key, $defaultValue) = self::parse($word);
                $options[$key] = $defaultValue;
            }

            /* Argument */
            elseif ($type == self::ARGUMENT_TYPE) {
                list($key, $defaultValue) = self::parse($word);
                $arguments[$key] = $defaultValue;
            }
        }

        return [$command, $arguments, $options];
    }
Parse command signature to command, arguments and options

@param string $signature
@return array