private function getOptionValue(\DOMElement $option)
    {
        if ($option->hasAttribute('value')) {
            return $option->getAttribute('value');
        }

        if (!empty($option->nodeValue)) {
            return $option->nodeValue;
        }

        return '1'; // DomCrawler uses 1 by default if there is no text in the option
    }
private function getOptionValue(\DOMElement $option)
    {
        if ($option->hasAttribute('value')) {
            return $option->getAttribute('value');
        }

        if (!empty($option->nodeValue)) {
            return $option->nodeValue;
        }

        return '1'; // DomCrawler uses 1 by default if there is no text in the option
    }
private function getOptionValue ( \ DOMElement $ option ) { if ( $ option -> hasAttribute ( 'value' ) ) { return $ option -> getAttribute ( 'value' ) ; } if ( ! empty ( $ option -> nodeValue ) ) { return $ option -> nodeValue ; } return '1' ; // DomCrawler uses 1 by default if there is no text in the option }
Gets the value of an option element

@param \DOMElement $option

@return string

@see \Symfony\Component\DomCrawler\Field\ChoiceFormField::buildOptionValue
Gets the value of an option element