Code Duplication    Length = 7-8 lines in 3 locations

core/EE_Addon.core.php 3 locations

@@ 316-323 (lines=8) @@
313
     *
314
     * @return void
315
     */
316
    public function new_install()
317
    {
318
        $classname = get_class($this);
319
        do_action("AHEE__{$classname}__new_install");
320
        do_action('AHEE__EE_Addon__new_install', $this);
321
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
322
        add_action(
323
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
324
            array($this, 'initialize_db_if_no_migrations_required')
325
        );
326
    }
@@ 335-341 (lines=7) @@
332
     *
333
     * @return void
334
     */
335
    public function reactivation()
336
    {
337
        $classname = get_class($this);
338
        do_action("AHEE__{$classname}__reactivation");
339
        do_action('AHEE__EE_Addon__reactivation', $this);
340
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
341
        add_action(
342
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
343
            array($this, 'initialize_db_if_no_migrations_required')
344
        );
@@ 485-492 (lines=8) @@
482
     *
483
     * @return void
484
     */
485
    public function upgrade()
486
    {
487
        $classname = get_class($this);
488
        do_action("AHEE__{$classname}__upgrade");
489
        do_action('AHEE__EE_Addon__upgrade', $this);
490
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
491
        // also it's possible there is new default data that needs to be added
492
        add_action(
493
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
494
            array($this, 'initialize_db_if_no_migrations_required')
495
        );