Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1039-1043 (lines=5) @@
1036
            return false;
1037
        }
1038
        $classPath = explode('\\', get_called_class());
1039
        if (!empty(static::$storage['options']['share'])) {
1040
            $moduleConfig = Config::share($classPath[0]);
1041
        } else {
1042
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1043
        }
1044
        $appType = App::$cur->type;
1045
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1046
            if (!empty($options['appType'])) {
@@ 1080-1084 (lines=5) @@
1077
     */
1078
    public static function getListFromModuleStorage($options = []) {
1079
        $classPath = explode('\\', get_called_class());
1080
        if (!empty(static::$storage['options']['share'])) {
1081
            $moduleConfig = Config::share($classPath[0]);
1082
        } else {
1083
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1084
        }
1085
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1086
            if (empty($options['appType'])) {
1087
                $appType = App::$cur->type;
@@ 1146-1150 (lines=5) @@
1143
        } else {
1144
            $appType = $options['appType'];
1145
        }
1146
        if (!empty(static::$storage['options']['share'])) {
1147
            $moduleConfig = Config::share($classPath[0]);
1148
        } else {
1149
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1150
        }
1151
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1152
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
1153
            if (empty($options['where'])) {
@@ 1371-1375 (lines=5) @@
1368
        $appType = '';
1369
        $classPath = explode('\\', get_called_class());
1370
1371
        if (!empty(static::$storage['options']['share'])) {
1372
            $moduleConfig = Config::share($classPath[0]);
1373
        } else {
1374
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1375
        }
1376
1377
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1378
            if (empty($options['appType'])) {
@@ 1574-1578 (lines=5) @@
1571
        $id = $this->pk();
1572
        $appType = '';
1573
        $classPath = explode('\\', get_called_class());
1574
        if (!empty(static::$storage['options']['share'])) {
1575
            $moduleConfig = Config::share($classPath[0]);
1576
        } else {
1577
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1578
        }
1579
1580
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1581
            if (empty($options['appType'])) {