src/main/php/input/ArgumentParser.php
private function fixArgs(array $args, array $parsedVars = []): array
    {
        array_shift($args); // script name
        $vars     = [];
        $position = 0;
        foreach ($args as $arg) {
            if (isset($parsedVars[substr($arg, 1)]) || isset($parsedVars[substr($arg, 2)]) || in_array($arg, $parsedVars)) {
                continue;
            }

            $vars['argv.' . $position] = $arg;
            $position++;
        }

        return array_merge($vars, $parsedVars);
    }
private function fixArgs(array $args, array $parsedVars = []): array
    {
        array_shift($args); // script name
        $vars     = [];
        $position = 0;
        foreach ($args as $arg) {
            if (isset($parsedVars[substr($arg, 1)]) || isset($parsedVars[substr($arg, 2)]) || in_array($arg, $parsedVars)) {
                continue;
            }

            $vars['argv.' . $position] = $arg;
            $position++;
        }

        return array_merge($vars, $parsedVars);
    }
private function fixArgs ( array $ args , array $ parsedVars = [ ] ) : array { array_shift ( $ args ) ; // script name $ vars = [ ] ; $ position = 0 ; foreach ( $ args as $ arg ) { if ( isset ( $ parsedVars [ substr ( $ arg , 1 ) ] ) || isset ( $ parsedVars [ substr ( $ arg , 2 ) ] ) || in_array ( $ arg , $ parsedVars ) ) { continue ; } $ vars [ 'argv.' . $ position ] = $ arg ; $ position ++ ; } return array_merge ( $ vars , $ parsedVars ) ; }
retrieves list of arguments

@param   array  $args
@param   array  $parsedVars
@return  array
retrieves list of arguments