Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1164-1168 (lines=5) @@
1161
        } else {
1162
            $appType = $options['appType'];
1163
        }
1164
        if (!empty(static::$storage['options']['share'])) {
1165
            $moduleConfig = Config::share($classPath[0]);
1166
        } else {
1167
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1168
        }
1169
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1170
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
1171
            if (empty($options['where'])) {
@@ 1394-1398 (lines=5) @@
1391
        $appType = '';
1392
        $classPath = explode('\\', get_called_class());
1393
1394
        if (!empty(static::$storage['options']['share'])) {
1395
            $moduleConfig = Config::share($classPath[0]);
1396
        } else {
1397
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1398
        }
1399
1400
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1401
            if (empty($options['appType'])) {
@@ 1053-1057 (lines=5) @@
1050
            return false;
1051
        }
1052
        $classPath = explode('\\', get_called_class());
1053
        if (!empty(static::$storage['options']['share'])) {
1054
            $moduleConfig = Config::share($classPath[0]);
1055
        } else {
1056
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1057
        }
1058
        $appType = App::$cur->type;
1059
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1060
            if (!empty($options['appType'])) {
@@ 1094-1098 (lines=5) @@
1091
     */
1092
    public static function getListFromModuleStorage($options = []) {
1093
        $classPath = explode('\\', get_called_class());
1094
        if (!empty(static::$storage['options']['share'])) {
1095
            $moduleConfig = Config::share($classPath[0]);
1096
        } else {
1097
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1098
        }
1099
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1100
            if (empty($options['appType'])) {
1101
                $appType = App::$cur->type;
@@ 1601-1605 (lines=5) @@
1598
        $id = $this->pk();
1599
        $appType = '';
1600
        $classPath = explode('\\', get_called_class());
1601
        if (!empty(static::$storage['options']['share'])) {
1602
            $moduleConfig = Config::share($classPath[0]);
1603
        } else {
1604
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1605
        }
1606
1607
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1608
            if (empty($options['appType'])) {