Code Duplication    Length = 13-13 lines in 2 locations

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

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