Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1042-1046 (lines=5) @@
1039
            return false;
1040
        }
1041
        $classPath = explode('\\', get_called_class());
1042
        if (!empty(static::$storage['options']['share'])) {
1043
            $moduleConfig = Config::share($classPath[0]);
1044
        } else {
1045
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1046
        }
1047
        $appType = App::$cur->type;
1048
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1049
            if (!empty($options['appType'])) {
@@ 1083-1087 (lines=5) @@
1080
     */
1081
    public static function getListFromModuleStorage($options = []) {
1082
        $classPath = explode('\\', get_called_class());
1083
        if (!empty(static::$storage['options']['share'])) {
1084
            $moduleConfig = Config::share($classPath[0]);
1085
        } else {
1086
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1087
        }
1088
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1089
            if (empty($options['appType'])) {
1090
                $appType = App::$cur->type;
@@ 1149-1153 (lines=5) @@
1146
        } else {
1147
            $appType = $options['appType'];
1148
        }
1149
        if (!empty(static::$storage['options']['share'])) {
1150
            $moduleConfig = Config::share($classPath[0]);
1151
        } else {
1152
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1153
        }
1154
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1155
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
1156
            if (empty($options['where'])) {
@@ 1374-1378 (lines=5) @@
1371
        $appType = '';
1372
        $classPath = explode('\\', get_called_class());
1373
1374
        if (!empty(static::$storage['options']['share'])) {
1375
            $moduleConfig = Config::share($classPath[0]);
1376
        } else {
1377
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1378
        }
1379
1380
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1381
            if (empty($options['appType'])) {
@@ 1577-1581 (lines=5) @@
1574
        $id = $this->pk();
1575
        $appType = '';
1576
        $classPath = explode('\\', get_called_class());
1577
        if (!empty(static::$storage['options']['share'])) {
1578
            $moduleConfig = Config::share($classPath[0]);
1579
        } else {
1580
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1581
        }
1582
1583
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1584
            if (empty($options['appType'])) {