Code Duplication    Length = 11-11 lines in 2 locations

src/Media/Events/MediaObjectCreated.php 1 location

@@ 102-112 (lines=11) @@
99
        );
100
    }
101
102
    public static function deserialize(array $data): MediaObjectCreated
103
    {
104
        return new self(
105
            new UUID($data['media_object_id']),
106
            new MIMEType($data['mime_type']),
107
            new StringLiteral($data['description']),
108
            new StringLiteral($data['copyright_holder']),
109
            Url::fromNative($data['source_location']),
110
            array_key_exists('language', $data) ? new Language($data['language']) : new Language('nl')
111
        );
112
    }
113
}
114

src/Media/Image.php 1 location

@@ 91-101 (lines=11) @@
88
        return $this->sourceLocation;
89
    }
90
91
    public static function deserialize(array $data): Image
92
    {
93
        return new self(
94
            new UUID($data['media_object_id']),
95
            new MIMEType($data['mime_type']),
96
            new Description($data['description']),
97
            new CopyrightHolder($data['copyright_holder']),
98
            Url::fromNative($data['source_location']),
99
            array_key_exists('language', $data) ? new Language($data['language']) : new Language('nl')
100
        );
101
    }
102
103
    public function serialize(): array
104
    {