Code Duplication    Length = 12-12 lines in 2 locations

core/domain/services/event/EventSpacesCalculator.php 2 locations

@@ 182-193 (lines=12) @@
179
                )
180
            );
181
        }
182
        if ($ticket->get_event_ID() !== $this->event->ID()) {
183
            throw new DomainException(
184
                sprintf(
185
                    esc_html__(
186
                        'An EE_Ticket for Event %1$d was supplied while calculating event space availability for Event %2$d.',
187
                        'event_espresso'
188
                    ),
189
                    $ticket->get_event_ID(),
190
                    $this->event->ID()
191
                )
192
            );
193
        }
194
    }
195
196
@@ 215-226 (lines=12) @@
212
     */
213
    public function setDatetime(EE_Datetime $datetime)
214
    {
215
        if ($datetime->event()->ID() !== $this->event->ID()) {
216
            throw new DomainException(
217
                sprintf(
218
                    esc_html__(
219
                        'An EE_Datetime for Event %1$d was supplied while calculating event space availability for Event %2$d.',
220
                        'event_espresso'
221
                    ),
222
                    $datetime->event()->ID(),
223
                    $this->event->ID()
224
                )
225
            );
226
        }
227
        $this->datetimes[$datetime->ID()] = $datetime;
228
    }
229