Code Duplication    Length = 3-3 lines in 2 locations

DBAL/Types/AbstractEnumType.php 2 locations

@@ 55-57 (lines=3) @@
52
            return null;
53
        }
54
55
        if (!isset(static::$choices[$value])) {
56
            throw new InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM "%s".', $value, $this->getName()));
57
        }
58
59
        return $value;
60
    }
@@ 199-201 (lines=3) @@
196
     */
197
    public static function assertValidChoice($value): void
198
    {
199
        if (!isset(static::$choices[$value])) {
200
            throw new InvalidArgumentException(\sprintf('Invalid value "%s" for ENUM type "%s".', (string) $value, static::class));
201
        }
202
    }
203
204
    /**