Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 435-438 (lines=4) @@
432
            }
433
            return;
434
        }
435
        if ($this->debug) {
436
            \EEH_Debug_Tools::printr($datetime_identifier, '* $datetime_identifier', __FILE__, __LINE__, 1);
437
            \EEH_Debug_Tools::printr("{$reg_limit}", 'REG LIMIT', __FILE__, __LINE__);
438
        }
439
        // number of allocated spaces always starts at zero
440
        $spaces_allocated                           = 0;
441
        $this->total_spaces[ $datetime_identifier ] = 0;
@@ 629-632 (lines=4) @@
626
            && isset($this->datetime_spaces[ $datetime_identifier ], $this->datetime_tickets[ $datetime_identifier ])
627
            && in_array($ticket_identifier, $this->datetime_tickets[ $datetime_identifier ], true)
628
            ) {
629
            if ($this->debug) {
630
                \EEH_Debug_Tools::printr($datetime_identifier, ' . . adjust Datetime Spaces for', __FILE__, __LINE__);
631
                \EEH_Debug_Tools::printr("{$this->datetime_spaces[ $datetime_identifier ]}", " . . current  {$datetime_identifier} spaces available", __FILE__, __LINE__);
632
            }
633
            // then decrement the available spaces for the datetime
634
            $this->datetime_spaces[ $datetime_identifier ] -= $ticket_quantity;
635
            // but don't let quantities go below zero