Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1058-1065 (lines=8) @@
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'])) {
1060
                $appType = $options['appType'];
1061
            }
1062
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1063
        } else {
1064
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1065
        }
1066
        if (!empty($storage[$classPath[1]])) {
1067
            $items = $storage[$classPath[1]];
1068
            $class = get_called_class();
@@ 1098-1107 (lines=10) @@
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;
1101
            } else {
1102
                $appType = $options['appType'];
1103
            }
1104
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1105
        } else {
1106
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1107
        }
1108
        if (!empty($storage[$classPath[1]])) {
1109
            $items = [];
1110
            $class = get_called_class();
@@ 1395-1404 (lines=10) @@
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'])) {
1397
                $appType = App::$cur->type;
1398
            } else {
1399
                $appType = $options['appType'];
1400
            }
1401
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1402
        } else {
1403
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1404
        }
1405
        if (empty($storage[$classPath[1]])) {
1406
            $storage[$classPath[1]] = [];
1407
        }
@@ 1599-1608 (lines=10) @@
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'])) {
1601
                $appType = App::$cur->type;
1602
            } else {
1603
                $appType = $options['appType'];
1604
            }
1605
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1606
        } else {
1607
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1608
        }
1609
        if (empty($storage[$classPath[1]])) {
1610
            $storage[$classPath[1]] = [];
1611
        }