Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1400-1409 (lines=10) @@
1397
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1398
        }
1399
1400
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1401
            if (empty($options['appType'])) {
1402
                $appType = App::$cur->type;
1403
            } else {
1404
                $appType = $options['appType'];
1405
            }
1406
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1407
        } else {
1408
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1409
        }
1410
        if (empty($storage[$classPath[1]])) {
1411
            $storage[$classPath[1]] = [];
1412
        }
@@ 1059-1066 (lines=8) @@
1056
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1057
        }
1058
        $appType = App::$cur->type;
1059
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1060
            if (!empty($options['appType'])) {
1061
                $appType = $options['appType'];
1062
            }
1063
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1064
        } else {
1065
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1066
        }
1067
        if (!empty($storage[$classPath[1]])) {
1068
            $items = $storage[$classPath[1]];
1069
            $class = get_called_class();
@@ 1099-1108 (lines=10) @@
1096
        } else {
1097
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1098
        }
1099
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1100
            if (empty($options['appType'])) {
1101
                $appType = App::$cur->type;
1102
            } else {
1103
                $appType = $options['appType'];
1104
            }
1105
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1106
        } else {
1107
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1108
        }
1109
        if (!empty($storage[$classPath[1]])) {
1110
            $items = [];
1111
            $class = get_called_class();
@@ 1607-1616 (lines=10) @@
1604
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1605
        }
1606
1607
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1608
            if (empty($options['appType'])) {
1609
                $appType = App::$cur->type;
1610
            } else {
1611
                $appType = $options['appType'];
1612
            }
1613
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1614
        } else {
1615
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1616
        }
1617
        if (empty($storage[$classPath[1]])) {
1618
            $storage[$classPath[1]] = [];
1619
        }