Code Duplication    Length = 12-12 lines in 2 locations

src/Organizer/OrganizerLDProjector.php 2 locations

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