Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1042-1049 (lines=8) @@
1039
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1040
        }
1041
        $appType = App::$cur->type;
1042
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1043
            if (!empty($options['appType'])) {
1044
                $appType = $options['appType'];
1045
            }
1046
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1047
        } else {
1048
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1049
        }
1050
        if (!empty($storage[$classPath[1]])) {
1051
            $items = $storage[$classPath[1]];
1052
            $class = get_called_class();
@@ 1082-1091 (lines=10) @@
1079
        } else {
1080
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1081
        }
1082
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1083
            if (empty($options['appType'])) {
1084
                $appType = App::$cur->type;
1085
            } else {
1086
                $appType = $options['appType'];
1087
            }
1088
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1089
        } else {
1090
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1091
        }
1092
        if (!empty($storage[$classPath[1]])) {
1093
            $items = [];
1094
            $class = get_called_class();
@@ 1374-1383 (lines=10) @@
1371
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1372
        }
1373
1374
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1375
            if (empty($options['appType'])) {
1376
                $appType = App::$cur->type;
1377
            } else {
1378
                $appType = $options['appType'];
1379
            }
1380
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1381
        } else {
1382
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1383
        }
1384
        if (empty($storage[$classPath[1]])) {
1385
            $storage[$classPath[1]] = [];
1386
        }
@@ 1577-1586 (lines=10) @@
1574
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1575
        }
1576
1577
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1578
            if (empty($options['appType'])) {
1579
                $appType = App::$cur->type;
1580
            } else {
1581
                $appType = $options['appType'];
1582
            }
1583
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1584
        } else {
1585
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1586
        }
1587
        if (empty($storage[$classPath[1]])) {
1588
            $storage[$classPath[1]] = [];
1589
        }