Matthias\SymfonyConsoleForm\Console\Helper\Question\AlwaysReturnKeyOfChoiceQuestion::resolveChoiceViewValue PHP Method

resolveChoiceViewValue() private method

private resolveChoiceViewValue ( string $selectedValue ) : string
$selectedValue string The selected value
return string The corresponding value of the ChoiceView
    private function resolveChoiceViewValue($selectedValue)
    {
        foreach ($this->choiceViews as $choiceView) {
            if (in_array($selectedValue, [$choiceView->data, $choiceView->value, $choiceView->label])) {
                return $choiceView->value;
            }
        }
        throw new \InvalidArgumentException(sprintf($this->_errorMessage, $selectedValue));
    }