src/Argument/Parser.php
protected function setArgumentValue($argv, $argument, $key, $value)
    {
        // Arguments are given the value true if they only need to
        // be defined on the command line to be set.
        if ($argument->noValue()) {
            $argument->setValue(true);
            return $argv;
        }

        if (is_null($value)) {
            if (count($argv) === 0) {
                return $argv;
            }

            // If the value wasn't previously defined in "key=value"
            // format then define it from the next command argument.
            $nextArgvValue = $argv[$key + 1];
            if ($this->isValidArgumentValue($nextArgvValue)) {
                $argument->setValue($nextArgvValue);
                unset($argv[$key + 1]);
                return $argv;
            }
        }

        $argument->setValue($value);

        return $argv;
    }
protected function setArgumentValue($argv, $argument, $key, $value)
    {
        // Arguments are given the value true if they only need to
        // be defined on the command line to be set.
        if ($argument->noValue()) {
            $argument->setValue(true);
            return $argv;
        }

        if (is_null($value)) {
            if (count($argv) === 0) {
                return $argv;
            }

            // If the value wasn't previously defined in "key=value"
            // format then define it from the next command argument.
            $nextArgvValue = $argv[$key + 1];
            if ($this->isValidArgumentValue($nextArgvValue)) {
                $argument->setValue($nextArgvValue);
                unset($argv[$key + 1]);
                return $argv;
            }
        }

        $argument->setValue($value);

        return $argv;
    }
protected function setArgumentValue ( $ argv , $ argument , $ key , $ value ) { // Arguments are given the value true if they only need to // be defined on the command line to be set. if ( $ argument -> noValue ( ) ) { $ argument -> setValue ( true ) ; return $ argv ; } if ( is_null ( $ value ) ) { if ( count ( $ argv ) === 0 ) { return $ argv ; } // If the value wasn't previously defined in "key=value" // format then define it from the next command argument. $ nextArgvValue = $ argv [ $ key + 1 ] ; if ( $ this -> isValidArgumentValue ( $ nextArgvValue ) ) { $ argument -> setValue ( $ nextArgvValue ) ; unset ( $ argv [ $ key + 1 ] ) ; return $ argv ; } } $ argument -> setValue ( $ value ) ; return $ argv ; }
Set the argument's value

@param array $argv
@param Argument $argument
@param int $key
@param string|null $value

@return array The new $argv
Set the argument s value