Code Duplication    Length = 13-13 lines in 2 locations

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

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