Code Duplication    Length = 13-13 lines in 2 locations

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

@@ 161-173 (lines=13) @@
158
159
        $documents = [];
160
161
        foreach ($eventIds as $eventId) {
162
            $document = $this->loadDocumentFromRepositoryByItemId(
163
                $eventId
164
            );
165
            $eventLD = $document->getBody();
166
167
            $newEventLD = clone $eventLD;
168
            $newEventLD->organizer = json_decode($organizer);
169
170
            if ($newEventLD != $eventLD) {
171
                $documents[] = $document->withBody($newEventLD);
172
            }
173
        }
174
175
        return $documents;
176
    }
@@ 195-207 (lines=13) @@
192
193
        $documents = [];
194
195
        foreach ($eventsLocatedAtPlace as $eventId) {
196
            $document = $this->loadDocumentFromRepositoryByItemId(
197
                $eventId
198
            );
199
            $eventLD = $document->getBody();
200
201
            $newEventLD = clone $eventLD;
202
            $newEventLD->location = json_decode($placeJSONLD);
203
204
            if ($newEventLD != $eventLD) {
205
                $documents[] = $document->withBody($newEventLD);
206
            }
207
        }
208
209
        return $documents;
210
    }