Code Duplication    Length = 13-13 lines in 2 locations

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

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