Code Duplication    Length = 3-3 lines in 2 locations

DBAL/Types/AbstractEnumType.php 2 locations

@@ 54-56 (lines=3) @@
51
            return null;
52
        }
53
54
        if (!isset(static::$choices[$value])) {
55
            throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM "%s".', $value, $this->getName()));
56
        }
57
58
        return $value;
59
    }
@@ 167-169 (lines=3) @@
164
     */
165
    public static function assertValidChoice(string $value)
166
    {
167
        if (!isset(static::$choices[$value])) {
168
            throw new \InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', $value, static::class));
169
        }
170
    }
171
172
    /**