src/Field/Scalar/EnumField.php
public function &possibilities(...$possibilities)
    {
        if ($this->getDefaultValue() !== null && !in_array($this->getDefaultValue(), $possibilities)) {
            throw new InvalidArgumentException('Default value ' . var_export($this->getDefaultValue(), true) . ' needs to be in the list of possibilities');
        }

        $this->possibilities = $possibilities;

        return $this;
    }
public function &possibilities(...$possibilities)
    {
        if ($this->getDefaultValue() !== null && !in_array($this->getDefaultValue(), $possibilities)) {
            throw new InvalidArgumentException('Default value ' . var_export($this->getDefaultValue(), true) . ' needs to be in the list of possibilities');
        }

        $this->possibilities = $possibilities;

        return $this;
    }
public function & possibilities ( ... $ possibilities ) { if ( $ this -> getDefaultValue ( ) !== null && ! in_array ( $ this -> getDefaultValue ( ) , $ possibilities ) ) { throw new InvalidArgumentException ( 'Default value ' . var_export ( $ this -> getDefaultValue ( ) , true ) . ' needs to be in the list of possibilities' ) ; } $ this -> possibilities = $ possibilities ; return $ this ; }
Set a list of possible values.

@param  string[] $possibilities
@return $this
Set a list of possible values .