Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 166-178 (lines=13) @@
163
164
        $documents = [];
165
166
        foreach ($eventIds as $eventId) {
167
            $document = $this->loadDocumentFromRepositoryByItemId(
168
                $eventId
169
            );
170
            $eventLD = $document->getBody();
171
172
            $newEventLD = clone $eventLD;
173
            $newEventLD->organizer = json_decode($organizer);
174
175
            if ($newEventLD != $eventLD) {
176
                $documents[] = $document->withBody($newEventLD);
177
            }
178
        }
179
180
        return $documents;
181
    }
@@ 200-212 (lines=13) @@
197
198
        $documents = [];
199
200
        foreach ($eventsLocatedAtPlace as $eventId) {
201
            $document = $this->loadDocumentFromRepositoryByItemId(
202
                $eventId
203
            );
204
            $eventLD = $document->getBody();
205
206
            $newEventLD = clone $eventLD;
207
            $newEventLD->location = json_decode($placeJSONLD);
208
209
            if ($newEventLD != $eventLD) {
210
                $documents[] = $document->withBody($newEventLD);
211
            }
212
        }
213
214
        return $documents;
215
    }