Code Duplication    Length = 7-7 lines in 3 locations

code/extensions/TicketExtension.php 3 locations

@@ 95-101 (lines=7) @@
92
        }
93
94
        // Create Attendees tab
95
        if ($this->owner->Attendees()->exists()) {
96
            $guestListLabel = _t('TicketExtension.GuestList', 'GuestList');
97
            $fields->addFieldToTab(
98
                "Root.$guestListLabel",
99
                GridField::create('Attendees', $guestListLabel, $this->owner->Attendees(), GuestListGridFieldConfig::create($this->owner))
100
            );
101
        }
102
103
        // Create WaitingList tab
104
        if ($this->owner->WaitingList()->exists()) {
@@ 104-110 (lines=7) @@
101
        }
102
103
        // Create WaitingList tab
104
        if ($this->owner->WaitingList()->exists()) {
105
            $waitingListLabel = _t('TicketExtension.WaitingList', 'WaitingList');
106
            $fields->addFieldToTab(
107
                "Root.$waitingListLabel",
108
                GridField::create('WaitingList', $waitingListLabel, $this->owner->WaitingList(), GridFieldConfig_RecordEditor::create())
109
            );
110
        }
111
112
        // Create Fields tab
113
        $extraFieldsLabel = _t('TicketExtension.ExtraFields', 'Attendee fields');
@@ 86-92 (lines=7) @@
83
        ));
84
85
        // Create Reservations tab
86
        if ($this->owner->Reservations()->exists()) {
87
            $reservationLabel = _t('TicketExtension.Reservations', 'Reservations');
88
            $fields->addFieldToTab(
89
                "Root.$reservationLabel",
90
                GridField::create('Reservations', $reservationLabel, $this->owner->Reservations(), ReservationGridFieldConfig::create())
91
            );
92
        }
93
94
        // Create Attendees tab
95
        if ($this->owner->Attendees()->exists()) {