Code Duplication    Length = 8-8 lines in 2 locations

src/Dbal/EncryptedColumn.php 1 location

@@ 58-65 (lines=8) @@
55
        return $this->encryptionService->decryptField(EncryptedColumnVO::fromArray($decoded));
56
    }
57
58
    public function convertToDatabaseValue($value, AbstractPlatform $platform)
59
    {
60
        if ($value === null) {
61
            return null;
62
        }
63
64
        return json_encode($this->encryptionService->encryptField($value));
65
    }
66
67
    /**
68
     * Based on: https://github.com/schmittjoh/serializer/blob/master/src/JMS/Serializer/JsonDeserializationVisitor.php

src/Dbal/EncryptedColumnLegacySupport.php 1 location

@@ 74-81 (lines=8) @@
71
        return $this->encryptionService->decryptField(EncryptedColumnVO::fromArray($decoded));
72
    }
73
74
    public function convertToDatabaseValue($value, AbstractPlatform $platform)
75
    {
76
        if ($value === null) {
77
            return null;
78
        }
79
80
        return json_encode($this->encryptionService->encryptField($value));
81
    }
82
83
    /**
84
     * Based on: https://github.com/schmittjoh/serializer/blob/master/src/JMS/Serializer/JsonDeserializationVisitor.php