input/formats/parsers/Argv.php
private function resolveShortOptionSet(string $shortcut, definitions\Options $definitions) : array
    {
        $length = strlen($shortcut);
        $result = [];

        // Loop through the string, character by character.
        for ($i = 0; $i < $length; $i++) {
            $definition = $definitions->getByShortcut($shortcut[$i]);

            // The last shortcut in a set may have a value appended afterwards.
            if ($definition->hasValue()) {
                $result[$definition->getName()] = $i === $length - 1 ? null : substr($shortcut, $i + 1);
                break;
            }

            $result[$definition->getName()] = null;
        }

        return $result;
    }
private function resolveShortOptionSet(string $shortcut, definitions\Options $definitions) : array
    {
        $length = strlen($shortcut);
        $result = [];

        // Loop through the string, character by character.
        for ($i = 0; $i < $length; $i++) {
            $definition = $definitions->getByShortcut($shortcut[$i]);

            // The last shortcut in a set may have a value appended afterwards.
            if ($definition->hasValue()) {
                $result[$definition->getName()] = $i === $length - 1 ? null : substr($shortcut, $i + 1);
                break;
            }

            $result[$definition->getName()] = null;
        }

        return $result;
    }
private function resolveShortOptionSet ( string $ shortcut , definitions \ Options $ definitions ) : array { $ length = strlen ( $ shortcut ) ; $ result = [ ] ; // Loop through the string, character by character. for ( $ i = 0 ; $ i < $ length ; $ i ++ ) { $ definition = $ definitions -> getByShortcut ( $ shortcut [ $ i ] ) ; // The last shortcut in a set may have a value appended afterwards. if ( $ definition -> hasValue ( ) ) { $ result [ $ definition -> getName ( ) ] = $ i === $ length - 1 ? null : substr ( $ shortcut , $ i + 1 ) ; break ; } $ result [ $ definition -> getName ( ) ] = null ; } return $ result ; }
Takes a set of short options contained in a string and resolves them to full options and their
values, depending on the Definitions given.

@param   string                  $shortcut       The short option(s) to resolve.
@param   definitions\Options     $definitions    The Options Definition.
@return  array                                   An array of full option $names => $values.
Takes a set of short options contained in a string and resolves them to full options and their values depending on the Definitions given .