public function getValue() : ?string
    {
        foreach ($this->getOptions() as $option) {
            if ($option->isSelected()) {
                return $option->getValue();
            }
        }

        return null;
    }
public function getValue() : ?string
    {
        foreach ($this->getOptions() as $option) {
            if ($option->isSelected()) {
                return $option->getValue();
            }
        }

        return null;
    }
public function getValue ( ) : ? string { foreach ( $ this -> getOptions ( ) as $ option ) { if ( $ option -> isSelected ( ) ) { return $ option -> getValue ( ) ; } } return null ; }
Returns the selected value, or null if none is selected.

@return string|null
Returns the selected value or null if none is selected .