Code Duplication    Length = 12-12 lines in 2 locations

src/Organizer/OrganizerLDProjector.php 2 locations

@@ 155-166 (lines=12) @@
152
    /**
153
     * @param AddressUpdated $addressUpdated
154
     */
155
    protected function applyAddressUpdated(AddressUpdated $addressUpdated)
156
    {
157
        $organizerId = $addressUpdated->getOrganizerId();
158
        $address = $addressUpdated->getAddress();
159
160
        $document = $this->repository->get($organizerId);
161
162
        $jsonLD = $document->getBody();
163
        $jsonLD->address = $address->toJsonLd();
164
165
        $this->repository->save($document->withBody($jsonLD));
166
    }
167
168
    /**
169
     * @param ContactPointUpdated $contactPointUpdated
@@ 171-182 (lines=12) @@
168
    /**
169
     * @param ContactPointUpdated $contactPointUpdated
170
     */
171
    protected function applyContactPointUpdated(ContactPointUpdated $contactPointUpdated)
172
    {
173
        $organizerId = $contactPointUpdated->getOrganizerId();
174
        $contactPoint = $contactPointUpdated->getContactPoint();
175
176
        $document = $this->repository->get($organizerId);
177
178
        $jsonLD = $document->getBody();
179
        $jsonLD->contactPoint = $contactPoint->toJsonLd();
180
181
        $this->repository->save($document->withBody($jsonLD));
182
    }
183
184
    /**
185
     * @param OrganizerUpdatedFromUDB2 $organizerUpdatedFromUDB2