Code Duplication    Length = 7-8 lines in 3 locations

core/EE_Addon.core.php 3 locations

@@ 305-312 (lines=8) @@
302
     *
303
     * @return void
304
     */
305
    public function new_install()
306
    {
307
        $classname = get_class($this);
308
        do_action("AHEE__{$classname}__new_install");
309
        do_action('AHEE__EE_Addon__new_install', $this);
310
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
311
        add_action(
312
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
313
            array($this, 'initialize_db_if_no_migrations_required')
314
        );
315
    }
@@ 324-330 (lines=7) @@
321
     *
322
     * @return void
323
     */
324
    public function reactivation()
325
    {
326
        $classname = get_class($this);
327
        do_action("AHEE__{$classname}__reactivation");
328
        do_action('AHEE__EE_Addon__reactivation', $this);
329
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
330
        add_action(
331
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
332
            array($this, 'initialize_db_if_no_migrations_required')
333
        );
@@ 466-473 (lines=8) @@
463
     *
464
     * @return void
465
     */
466
    public function upgrade()
467
    {
468
        $classname = get_class($this);
469
        do_action("AHEE__{$classname}__upgrade");
470
        do_action('AHEE__EE_Addon__upgrade', $this);
471
        EE_Maintenance_Mode::instance()->set_maintenance_mode_if_db_old();
472
        //also it's possible there is new default data that needs to be added
473
        add_action(
474
            'AHEE__EE_System__perform_activations_upgrades_and_migrations',
475
            array($this, 'initialize_db_if_no_migrations_required')
476
        );