Code Duplication    Length = 18-18 lines in 2 locations

core/domain/services/admin/AdminToolBar.php 2 locations

@@ 176-193 (lines=18) @@
173
    /**
174
     * @return void
175
     */
176
    private function addEventsAddEditHeader()
177
    {
178
        if ($this->capabilities->current_user_can(
179
            'ee_read_events',
180
            'ee_admin_bar_menu_espresso-toolbar-events-view'
181
        )
182
        ) {
183
            $this->admin_bar->add_menu(
184
                array(
185
                    'id'     => 'espresso-toolbar-events-add-edit',
186
                    'parent' => 'espresso-toolbar-events',
187
                    'title'  => esc_html__('Add / Edit', 'event_espresso'),
188
                    'href'   => '',
189
                )
190
            );
191
        }
192
    }
193
194
195
    /**
196
     * @return void
@@ 266-283 (lines=18) @@
263
    /**
264
     * @return void
265
     */
266
    private function addEventsViewHeader()
267
    {
268
        if ($this->capabilities->current_user_can(
269
            'ee_read_events',
270
            'ee_admin_bar_menu_espresso-toolbar-events-view'
271
        )) {
272
            $this->admin_bar->add_menu(
273
                array(
274
                    'id'     => 'espresso-toolbar-events-view',
275
                    'parent' => 'espresso-toolbar-events',
276
                    'title'  => esc_html__('View', 'event_espresso'),
277
                    'href'   => '',
278
                )
279
            );
280
        }
281
    }
282
283
284
    /**
285
     * @return void
286
     */