Code Duplication    Length = 10-11 lines in 2 locations

src/Infrastructure/Persistence/Doctrine/Type/AbstractBinaryUuidType.php 1 location

@@ 37-47 (lines=11) @@
34
     *
35
     * @return AbstractUuidId|null
36
     */
37
    public function convertToPHPValue($value, AbstractPlatform $platform)
38
    {
39
        /** @var RamseyUuid $ramseyUuid */
40
        $ramseyUuid = parent::convertToPHPValue($value, $platform);
41
42
        if ($ramseyUuid === null) {
43
            return null;
44
        }
45
46
        return $this->createSpecificObject((string) $ramseyUuid);
47
    }
48
49
    /**
50
     * @param AbstractUuidId $value

src/Infrastructure/Persistence/Doctrine/Type/TypeTrait.php 1 location

@@ 26-35 (lines=10) @@
23
{
24
    abstract protected function getMappedClass(): string;
25
26
    public function convertToPHPValue($value, AbstractPlatform $platform)
27
    {
28
        $value = parent::convertToPHPValue($value, $platform);
29
30
        if ($value === null) {
31
            return null;
32
        }
33
34
        return $this->createSpecificObject($value);
35
    }
36
37
    /**
38
     * @param AbstractPlatform $platform This needs to be here in order to comply to the Type class method signature