Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1055-1062 (lines=8) @@
1052
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1053
        }
1054
        $appType = App::$cur->type;
1055
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1056
            if (!empty($options['appType'])) {
1057
                $appType = $options['appType'];
1058
            }
1059
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1060
        } else {
1061
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1062
        }
1063
        if (!empty($storage[$classPath[1]])) {
1064
            $items = $storage[$classPath[1]];
1065
            $class = get_called_class();
@@ 1095-1104 (lines=10) @@
1092
        } else {
1093
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1094
        }
1095
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1096
            if (empty($options['appType'])) {
1097
                $appType = App::$cur->type;
1098
            } else {
1099
                $appType = $options['appType'];
1100
            }
1101
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1102
        } else {
1103
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1104
        }
1105
        if (!empty($storage[$classPath[1]])) {
1106
            $items = [];
1107
            $class = get_called_class();
@@ 1396-1405 (lines=10) @@
1393
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1394
        }
1395
1396
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1397
            if (empty($options['appType'])) {
1398
                $appType = App::$cur->type;
1399
            } else {
1400
                $appType = $options['appType'];
1401
            }
1402
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1403
        } else {
1404
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1405
        }
1406
        if (empty($storage[$classPath[1]])) {
1407
            $storage[$classPath[1]] = [];
1408
        }
@@ 1603-1612 (lines=10) @@
1600
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1601
        }
1602
1603
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1604
            if (empty($options['appType'])) {
1605
                $appType = App::$cur->type;
1606
            } else {
1607
                $appType = $options['appType'];
1608
            }
1609
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1610
        } else {
1611
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1612
        }
1613
        if (empty($storage[$classPath[1]])) {
1614
            $storage[$classPath[1]] = [];
1615
        }