Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1049-1053 (lines=5) @@
1046
            return false;
1047
        }
1048
        $classPath = explode('\\', get_called_class());
1049
        if (!empty(static::$storage['options']['share'])) {
1050
            $moduleConfig = Config::share($classPath[0]);
1051
        } else {
1052
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1053
        }
1054
        $appType = App::$cur->type;
1055
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1056
            if (!empty($options['appType'])) {
@@ 1090-1094 (lines=5) @@
1087
     */
1088
    public static function getListFromModuleStorage($options = []) {
1089
        $classPath = explode('\\', get_called_class());
1090
        if (!empty(static::$storage['options']['share'])) {
1091
            $moduleConfig = Config::share($classPath[0]);
1092
        } else {
1093
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1094
        }
1095
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1096
            if (empty($options['appType'])) {
1097
                $appType = App::$cur->type;
@@ 1160-1164 (lines=5) @@
1157
        } else {
1158
            $appType = $options['appType'];
1159
        }
1160
        if (!empty(static::$storage['options']['share'])) {
1161
            $moduleConfig = Config::share($classPath[0]);
1162
        } else {
1163
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1164
        }
1165
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1166
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
1167
            if (empty($options['where'])) {
@@ 1390-1394 (lines=5) @@
1387
        $appType = '';
1388
        $classPath = explode('\\', get_called_class());
1389
1390
        if (!empty(static::$storage['options']['share'])) {
1391
            $moduleConfig = Config::share($classPath[0]);
1392
        } else {
1393
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1394
        }
1395
1396
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1397
            if (empty($options['appType'])) {
@@ 1597-1601 (lines=5) @@
1594
        $id = $this->pk();
1595
        $appType = '';
1596
        $classPath = explode('\\', get_called_class());
1597
        if (!empty(static::$storage['options']['share'])) {
1598
            $moduleConfig = Config::share($classPath[0]);
1599
        } else {
1600
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1601
        }
1602
1603
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1604
            if (empty($options['appType'])) {