Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

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