Code Duplication    Length = 5-5 lines in 2 locations

application/modules/translator/classes/LangReplacer.php 2 locations

@@ 366-370 (lines=5) @@
363
    public static function getModuleLanguages($module) {
364
        $languages = [];
365
366
        if (in_array($module, ['shop', '', 'main'])) {
367
            $path = PUBPATH . APPPATH . 'language/main/*';
368
        } else {
369
            $path = self::getModulePath($module) . '/language/*';
370
        }
371
372
        foreach (glob($path) as $item) {
373
            $languages[] = substr($item, strrpos($item, '/') + 1);
@@ 417-421 (lines=5) @@
414
     * @return string
415
     */
416
    public static function getTranslationDir($domain, $locale) {
417
        if (in_array($domain, ['shop', '', 'main'])) {
418
            $transPath = PUBPATH . APPPATH . "language/main/{$locale}/LC_MESSAGES/";
419
        } else {
420
            $transPath = self::getModulePath($domain) . "/language/{$locale}/LC_MESSAGES/";
421
        }
422
        return $transPath;
423
    }
424