Code Duplication    Length = 10-13 lines in 2 locations

core/services/commands/registration/CreateRegistrationCommand.php 1 location

@@ 88-97 (lines=10) @@
85
    ) {
86
        // grab the related ticket object for this line_item
87
        $this->ticket = $ticket_line_item->ticket();
88
        if ( ! $this->ticket instanceof EE_Ticket) {
89
            throw new InvalidEntityException(
90
                is_object($this->ticket) ? get_class($this->ticket) : gettype($this->ticket),
91
                'EE_Ticket',
92
                sprintf(
93
                    __('Line item %s did not contain a valid ticket', 'event_espresso'),
94
                    $ticket_line_item->ID()
95
                )
96
            );
97
        }
98
        $this->transaction = $transaction;
99
        $this->ticket_line_item = $ticket_line_item;
100
        $this->reg_count = absint($reg_count);

core/services/shortcodes/ShortcodesManager.php 1 location

@@ 140-152 (lines=13) @@
137
                'FHEE__EventEspresso_core_services_shortcodes_ShortcodesManager__registerShortcodes__shortcode_collection',
138
                $this->getShortcodes()
139
            );
140
            if (! $this->shortcodes instanceof CollectionInterface) {
141
                throw new InvalidEntityException(
142
                    $this->shortcodes,
143
                    'CollectionInterface',
144
                    sprintf(
145
                        esc_html__(
146
                            'The "FHEE__EventEspresso_core_services_shortcodes_ShortcodesManager__registerShortcodes__shortcode_collection" filter must return a Collection of EspressoShortcode objects. "%1$s" was received instead.',
147
                            'event_espresso'
148
                        ),
149
                        is_object($this->shortcodes) ? get_class($this->shortcodes) : gettype($this->shortcodes)
150
                    )
151
                );
152
            }
153
            $this->legacy_shortcodes_manager->registerShortcodes();
154
        } catch (Exception $exception) {
155
            new ExceptionStackTraceDisplay($exception);