Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 852-859 (lines=8) @@
849
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
850
        }
851
        $appType = App::$cur->type;
852
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
853
            if (!empty($options['appType'])) {
854
                $appType = $options['appType'];
855
            }
856
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
857
        } else {
858
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
859
        }
860
        if (!empty($storage[$classPath[1]])) {
861
            $items = $storage[$classPath[1]];
862
            $class = get_called_class();
@@ 891-900 (lines=10) @@
888
        } else {
889
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
890
        }
891
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
892
            if (empty($options['appType'])) {
893
                $appType = App::$cur->type;
894
            } else {
895
                $appType = $options['appType'];
896
            }
897
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
898
        } else {
899
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
900
        }
901
        if (!empty($storage[$classPath[1]])) {
902
            $items = [];
903
            $class = get_called_class();
@@ 1178-1187 (lines=10) @@
1175
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1176
        }
1177
1178
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1179
            if (empty($options['appType'])) {
1180
                $appType = App::$cur->type;
1181
            } else {
1182
                $appType = $options['appType'];
1183
            }
1184
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1185
        } else {
1186
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1187
        }
1188
        if (empty($storage[$classPath[1]])) {
1189
            $storage[$classPath[1]] = [];
1190
        }
@@ 1381-1390 (lines=10) @@
1378
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1379
        }
1380
1381
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1382
            if (empty($options['appType'])) {
1383
                $appType = App::$cur->type;
1384
            } else {
1385
                $appType = $options['appType'];
1386
            }
1387
            $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1388
        } else {
1389
            $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1390
        }
1391
        if (empty($storage[$classPath[1]])) {
1392
            $storage[$classPath[1]] = [];
1393
        }