Code Duplication    Length = 11-11 lines in 2 locations

src/Media/Events/MediaObjectCreated.php 1 location

@@ 137-147 (lines=11) @@
134
     *
135
     * @return MediaObjectCreated The object instance
136
     */
137
    public static function deserialize(array $data)
138
    {
139
        return new static(
140
            new UUID($data['media_object_id']),
141
            new MIMEType($data['mime_type']),
142
            new StringLiteral($data['description']),
143
            new StringLiteral($data['copyright_holder']),
144
            Url::fromNative($data['source_location']),
145
            array_key_exists('language', $data) ? new Language($data['language']) : new Language('nl')
146
        );
147
    }
148
}
149

src/Media/Image.php 1 location

@@ 112-122 (lines=11) @@
109
    /**
110
     * {@inheritdoc}
111
     */
112
    public static function deserialize(array $data)
113
    {
114
        return new static(
115
            new UUID($data['media_object_id']),
116
            new MIMEType($data['mime_type']),
117
            new Description($data['description']),
118
            new CopyrightHolder($data['copyright_holder']),
119
            Url::fromNative($data['source_location']),
120
            array_key_exists('language', $data) ? new Language($data['language']) : new Language('nl')
121
        );
122
    }
123
124
    /**
125
     * {@inheritdoc}