Code Duplication    Length = 3-5 lines in 4 locations

src/Event/ReadModel/JSONLD/EventLDProjector.php 1 location

@@ 500-504 (lines=5) @@
497
                $jsonLD->modified = $jsonLD->created;
498
499
                $metaData = $domainMessage->getMetadata()->serialize();
500
                if (isset($metaData['user_email'])) {
501
                    $jsonLD->creator = $metaData['user_email'];
502
                } elseif (isset($metaData['user_nick'])) {
503
                    $jsonLD->creator = $metaData['user_nick'];
504
                }
505
506
                $jsonLD->workflowStatus = WorkflowStatus::DRAFT()->getName();
507

src/Place/ReadModel/JSONLD/PlaceLDProjector.php 1 location

@@ 220-224 (lines=5) @@
217
        $jsonLD->modified = $jsonLD->created;
218
219
        $metaData = $domainMessage->getMetadata()->serialize();
220
        if (isset($metaData['user_email'])) {
221
            $jsonLD->creator = $metaData['user_email'];
222
        } elseif (isset($metaData['user_nick'])) {
223
            $jsonLD->creator = $metaData['user_nick'];
224
        }
225
226
        $jsonLD->workflowStatus = WorkflowStatus::DRAFT()->getName();
227

src/Organizer/OrganizerLDProjector.php 2 locations

@@ 113-115 (lines=3) @@
110
        )->format('c');
111
112
        $metaData = $domainMessage->getMetadata()->serialize();
113
        if (isset($metaData['user_id']) && isset($metaData['user_nick'])) {
114
            $jsonLD->creator = "{$metaData['user_id']} ({$metaData['user_nick']})";
115
        }
116
117
        $this->repository->save($document->withBody($jsonLD));
118
    }
@@ 146-148 (lines=3) @@
143
        )->format('c');
144
145
        $metaData = $domainMessage->getMetadata()->serialize();
146
        if (isset($metaData['user_id']) && isset($metaData['user_nick'])) {
147
            $jsonLD->creator = "{$metaData['user_id']} ({$metaData['user_nick']})";
148
        }
149
150
        $this->repository->save($document->withBody($jsonLD));
151
    }