Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1099-1106 (lines=8) @@
1096
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1097
        }
1098
        $appType = App::$cur->type;
1099
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1100
            if (!empty($options['appType'])) {
1101
                $appType = $options['appType'];
1102
            }
1103
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1104
        } else {
1105
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1106
        }
1107
        if (!empty($storage[$classPath[1]])) {
1108
            $items = $storage[$classPath[1]];
1109
            $class = get_called_class();
@@ 1139-1148 (lines=10) @@
1136
        } else {
1137
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1138
        }
1139
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1140
            if (empty($options['appType'])) {
1141
                $appType = App::$cur->type;
1142
            } else {
1143
                $appType = $options['appType'];
1144
            }
1145
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1146
        } else {
1147
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1148
        }
1149
        if (!empty($storage[$classPath[1]])) {
1150
            $items = [];
1151
            $class = get_called_class();
@@ 1440-1449 (lines=10) @@
1437
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1438
        }
1439
1440
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1441
            if (empty($options['appType'])) {
1442
                $appType = App::$cur->type;
1443
            } else {
1444
                $appType = $options['appType'];
1445
            }
1446
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1447
        } else {
1448
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1449
        }
1450
        if (empty($storage[$classPath[1]])) {
1451
            $storage[$classPath[1]] = [];
1452
        }
@@ 1647-1656 (lines=10) @@
1644
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1645
        }
1646
1647
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1648
            if (empty($options['appType'])) {
1649
                $appType = App::$cur->type;
1650
            } else {
1651
                $appType = $options['appType'];
1652
            }
1653
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1654
        } else {
1655
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1656
        }
1657
        if (empty($storage[$classPath[1]])) {
1658
            $storage[$classPath[1]] = [];
1659
        }