src/CommandLineParser.php
private function addDefaultValues()
    {
        foreach ($this->optionList as $option) {
            if ($option->getArgument()->hasDefaultValue()
                    && !isset($this->options[$option->short()])
                    && !isset($this->options[$option->long()])
            ) {
                if ($option->short()) {
                    $this->options[$option->short()] = new Value(
                        $option->getArgument()->getDefaultValue(),true);
                }
                if ($option->long()) {
                    $this->options[$option->long()] = new Value(
                        $option->getArgument()->getDefaultValue(),true);
                }
/*
                if ($option->short()) {
                    $this->addOption($option->short(), $option->getArgument()->getDefaultValue());
                }
                if ($option->long()) {
                    $this->addOption($option->long(), $option->getArgument()->getDefaultValue());
                }
*/
            }
        }
    }
private function addDefaultValues()
    {
        foreach ($this->optionList as $option) {
            if ($option->getArgument()->hasDefaultValue()
                    && !isset($this->options[$option->short()])
                    && !isset($this->options[$option->long()])
            ) {
                if ($option->short()) {
                    $this->options[$option->short()] = new Value(
                        $option->getArgument()->getDefaultValue(),true);
                }
                if ($option->long()) {
                    $this->options[$option->long()] = new Value(
                        $option->getArgument()->getDefaultValue(),true);
                }
/*
                if ($option->short()) {
                    $this->addOption($option->short(), $option->getArgument()->getDefaultValue());
                }
                if ($option->long()) {
                    $this->addOption($option->long(), $option->getArgument()->getDefaultValue());
                }
*/
            }
        }
    }
private function addDefaultValues ( ) { foreach ( $ this -> optionList as $ option ) { if ( $ option -> getArgument ( ) -> hasDefaultValue ( ) && ! isset ( $ this -> options [ $ option -> short ( ) ] ) && ! isset ( $ this -> options [ $ option -> long ( ) ] ) ) { if ( $ option -> short ( ) ) { $ this -> options [ $ option -> short ( ) ] = new Value ( $ option -> getArgument ( ) -> getDefaultValue ( ) , true ) ; } if ( $ option -> long ( ) ) { $ this -> options [ $ option -> long ( ) ] = new Value ( $ option -> getArgument ( ) -> getDefaultValue ( ) , true ) ; } /*
                if ($option->short()) {
                    $this->addOption($option->short(), $option->getArgument()->getDefaultValue());
                }
                if ($option->long()) {
                    $this->addOption($option->long(), $option->getArgument()->getDefaultValue());
                }
*/ } } }
If there are options with default values that were not overridden
by the parsed option string, add them to the list of known options.
If there are options with default values that were not overridden by the parsed option string add them to the list of known options .