protected function completeForOptionValues()
    {
        $wordIndex = $this->context->getWordIndex();

        if ($this->command && $wordIndex > 1) {
            $left = $this->context->getWordAtIndex($wordIndex - 1);

            if (strpos($left, '--') === 0) {
                $name = substr($left, 2);
                $def = $this->command->getNativeDefinition();

                if (!$def->hasOption($name)) {
                    return false;
                }

                $opt = $def->getOption($name);
                if ($opt->isValueRequired() || $opt->isValueOptional()) {
                    return $this->completeOption($opt);
                }
            }
        }

        return false;
    }
protected function completeForOptionValues()
    {
        $wordIndex = $this->context->getWordIndex();

        if ($this->command && $wordIndex > 1) {
            $left = $this->context->getWordAtIndex($wordIndex - 1);

            if (strpos($left, '--') === 0) {
                $name = substr($left, 2);
                $def = $this->command->getNativeDefinition();

                if (!$def->hasOption($name)) {
                    return false;
                }

                $opt = $def->getOption($name);
                if ($opt->isValueRequired() || $opt->isValueOptional()) {
                    return $this->completeOption($opt);
                }
            }
        }

        return false;
    }
protected function completeForOptionValues ( ) { $ wordIndex = $ this -> context -> getWordIndex ( ) ; if ( $ this -> command && $ wordIndex > 1 ) { $ left = $ this -> context -> getWordAtIndex ( $ wordIndex - 1 ) ; if ( strpos ( $ left , '--' ) === 0 ) { $ name = substr ( $ left , 2 ) ; $ def = $ this -> command -> getNativeDefinition ( ) ; if ( ! $ def -> hasOption ( $ name ) ) { return false ; } $ opt = $ def -> getOption ( $ name ) ; if ( $ opt -> isValueRequired ( ) || $ opt -> isValueOptional ( ) ) { return $ this -> completeOption ( $ opt ) ; } } } return false ; }
Attemp to complete the current word as the value of a long-form option

@return array|false
Attemp to complete the current word as the value of a long - form option