Code Duplication    Length = 7-8 lines in 3 locations

htdocs/modules/comments/preloads/preload.php 3 locations

@@ 63-69 (lines=7) @@
60
        }
61
    }
62
63
    public static function eventSystemModuleInstall(XoopsModule $module)
64
    {
65
        $helper = \Xoops::getModuleHelper('comments');
66
        if ($plugin = Plugin::getPlugin($module->getVar('dirname'), 'comments', true)) {
67
            $helper::getInstance()->insertModuleRelations($module);
68
        }
69
    }
70
71
    /**
72
     * remove any comeents for module being uninstalled
@@ 78-84 (lines=7) @@
75
     *
76
     * @return void
77
     */
78
    public static function eventSystemModuleUninstall(XoopsModule $module)
79
    {
80
        $helper = \Xoops::getModuleHelper('comments');
81
        if ($plugin = Plugin::getPlugin($module->getVar('dirname'), 'comments')) {
82
            $helper->deleteModuleRelations($module);
83
        }
84
    }
85
86
    public static function eventSystemPreferencesForm(XoopsModule $module)
87
    {
@@ 86-93 (lines=8) @@
83
        }
84
    }
85
86
    public static function eventSystemPreferencesForm(XoopsModule $module)
87
    {
88
        $helper = \Xoops::getModuleHelper('comments');
89
90
        if ($plugin = Plugin::getPlugin($module->getVar('dirname'), 'comments')) {
91
            $helper->loadLanguage('main');
92
        }
93
    }
94
}
95