Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 846-850 (lines=5) @@
843
            return false;
844
        }
845
        $classPath = explode('\\', get_called_class());
846
        if (!empty(static::$storage['options']['share'])) {
847
            $moduleConfig = Config::share($classPath[0]);
848
        } else {
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'])) {
@@ 886-890 (lines=5) @@
883
    public static function getListFromModuleStorage($options = [])
884
    {
885
        $classPath = explode('\\', get_called_class());
886
        if (!empty(static::$storage['options']['share'])) {
887
            $moduleConfig = Config::share($classPath[0]);
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;
@@ 953-957 (lines=5) @@
950
        } else {
951
            $appType = $options['appType'];
952
        }
953
        if (!empty(static::$storage['options']['share'])) {
954
            $moduleConfig = Config::share($classPath[0]);
955
        } else {
956
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
957
        }
958
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
959
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
960
            if (empty($options['where'])) {
@@ 1172-1176 (lines=5) @@
1169
        $appType = '';
1170
        $classPath = explode('\\', get_called_class());
1171
1172
        if (!empty(static::$storage['options']['share'])) {
1173
            $moduleConfig = Config::share($classPath[0]);
1174
        } else {
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'])) {
@@ 1375-1379 (lines=5) @@
1372
        $id = $this->pk();
1373
        $appType = '';
1374
        $classPath = explode('\\', get_called_class());
1375
        if (!empty(static::$storage['options']['share'])) {
1376
            $moduleConfig = Config::share($classPath[0]);
1377
        } else {
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'])) {