Code Duplication    Length = 21-21 lines in 2 locations

src/Organizer/Organizer.php 2 locations

@@ 180-200 (lines=21) @@
177
     * @param Title $title
178
     * @param Language $language
179
     */
180
    public function updateTitle(
181
        Title $title,
182
        Language $language
183
    ) {
184
        if ($this->isTitleChanged($title, $language)) {
185
            if ($language->getCode() !== $this->mainLanguage->getCode()) {
186
                $event = new TitleTranslated(
187
                    $this->actorId,
188
                    $title,
189
                    $language
190
                );
191
            } else {
192
                $event = new TitleUpdated(
193
                    $this->actorId,
194
                    $title
195
                );
196
            }
197
198
            $this->apply($event);
199
        }
200
    }
201
202
    /**
203
     * @param Address $address
@@ 206-226 (lines=21) @@
203
     * @param Address $address
204
     * @param Language $language
205
     */
206
    public function updateAddress(
207
        Address $address,
208
        Language $language
209
    ) {
210
        if ($this->isAddressChanged($address, $language)) {
211
            if ($language->getCode() !== $this->mainLanguage->getCode()) {
212
                $event = new AddressTranslated(
213
                    $this->actorId,
214
                    $address,
215
                    $language
216
                );
217
            } else {
218
                $event = new AddressUpdated(
219
                    $this->actorId,
220
                    $address
221
                );
222
            }
223
224
            $this->apply($event);
225
        }
226
    }
227
228
    public function removeAddress()
229
    {