Code Duplication    Length = 13-13 lines in 2 locations

src/Event/ReadModel/JSONLD/EventLDProjector.php 2 locations

@@ 171-183 (lines=13) @@
168
169
        $documents = [];
170
171
        foreach ($eventIds as $eventId) {
172
            $document = $this->loadDocumentFromRepositoryByItemId(
173
                $eventId
174
            );
175
            $eventLD = $document->getBody();
176
177
            $newEventLD = clone $eventLD;
178
            $newEventLD->organizer = json_decode($organizer);
179
180
            if ($newEventLD != $eventLD) {
181
                $documents[] = $document->withBody($newEventLD);
182
            }
183
        }
184
185
        return $documents;
186
    }
@@ 205-217 (lines=13) @@
202
203
        $documents = [];
204
205
        foreach ($eventsLocatedAtPlace as $eventId) {
206
            $document = $this->loadDocumentFromRepositoryByItemId(
207
                $eventId
208
            );
209
            $eventLD = $document->getBody();
210
211
            $newEventLD = clone $eventLD;
212
            $newEventLD->location = json_decode($placeJSONLD);
213
214
            if ($newEventLD != $eventLD) {
215
                $documents[] = $document->withBody($newEventLD);
216
            }
217
        }
218
219
        return $documents;
220
    }