protected function parseShortOption(string $token) : array
    {
        if (mb_substr($token, 0, 1) !== '-') {
            throw new RuntimeException("Invalid short option \"$token\"");
        }

        // Trim the "-"
        $token = mb_substr($token, 1);

        $options = [];

        // Each character in a short option is an option
        $tokens = preg_split('//u', $token, -1, PREG_SPLIT_NO_EMPTY);

        foreach ($tokens as $singleToken) {
            $options[] = [$singleToken, null];
        }

        return $options;
    }
protected function parseShortOption(string $token) : array
    {
        if (mb_substr($token, 0, 1) !== '-') {
            throw new RuntimeException("Invalid short option \"$token\"");
        }

        // Trim the "-"
        $token = mb_substr($token, 1);

        $options = [];

        // Each character in a short option is an option
        $tokens = preg_split('//u', $token, -1, PREG_SPLIT_NO_EMPTY);

        foreach ($tokens as $singleToken) {
            $options[] = [$singleToken, null];
        }

        return $options;
    }
protected function parseShortOption ( string $ token ) : array { if ( mb_substr ( $ token , 0 , 1 ) !== '-' ) { throw new RuntimeException ( "Invalid short option \"$token\"" ) ; } // Trim the "-" $ token = mb_substr ( $ token , 1 ) ; $ options = [ ] ; // Each character in a short option is an option $ tokens = preg_split ( '//u' , $ token , - 1 , PREG_SPLIT_NO_EMPTY ) ; foreach ( $ tokens as $ singleToken ) { $ options [ ] = [ $ singleToken , null ] ; } return $ options ; }
Parses a short option token and returns an array of data

@param string $token The token to parse
@return array The name of the option mapped to its value
@throws RuntimeException Thrown if the option could not be parsed
Parses a short option token and returns an array of data