src/Bridge/Symfony/Form/DataTransformer/ValueToEnumTransformer.php
public function reverseTransform($value)
    {
        if ($value === null) {
            return null;
        }

        try {
            return $this->enumClass::get($value);
        } catch (InvalidValueException $exception) {
            throw new TransformationFailedException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
public function reverseTransform($value)
    {
        if ($value === null) {
            return null;
        }

        try {
            return $this->enumClass::get($value);
        } catch (InvalidValueException $exception) {
            throw new TransformationFailedException($exception->getMessage(), $exception->getCode(), $exception);
        }
    }
public function reverseTransform ( $ value ) { if ( $ value === null ) { return null ; } try { return $ this -> enumClass :: get ( $ value ) ; } catch ( InvalidValueException $ exception ) { throw new TransformationFailedException ( $ exception -> getMessage ( ) , $ exception -> getCode ( ) , $ exception ) ; } }
Transforms a raw enumerated value to an enumeration instance.

@param int|string|null $value Value accepted by EnumInterface

@throws TransformationFailedException When the transformation fails

@return EnumInterface|null A single EnumInterface instance or null
Transforms a raw enumerated value to an enumeration instance .