Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1162-1166 (lines=5) @@
1159
        $appType = '';
1160
        $classPath = explode('\\', get_called_class());
1161
1162
        if (!empty(static::$storage['options']['share'])) {
1163
            $moduleConfig = Config::share($classPath[0]);
1164
        } else {
1165
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1166
        }
1167
1168
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1169
            if (empty($options['appType'])) {
@@ 1365-1369 (lines=5) @@
1362
        $id = $this->pk();
1363
        $appType = '';
1364
        $classPath = explode('\\', get_called_class());
1365
        if (!empty(static::$storage['options']['share'])) {
1366
            $moduleConfig = Config::share($classPath[0]);
1367
        } else {
1368
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1369
        }
1370
1371
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1372
            if (empty($options['appType'])) {
@@ 836-840 (lines=5) @@
833
            return false;
834
        }
835
        $classPath = explode('\\', get_called_class());
836
        if (!empty(static::$storage['options']['share'])) {
837
            $moduleConfig = Config::share($classPath[0]);
838
        } else {
839
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
840
        }
841
        $appType = App::$cur->type;
842
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
843
            if (!empty($options['appType'])) {
@@ 876-880 (lines=5) @@
873
    public static function getListFromModuleStorage($options = [])
874
    {
875
        $classPath = explode('\\', get_called_class());
876
        if (!empty(static::$storage['options']['share'])) {
877
            $moduleConfig = Config::share($classPath[0]);
878
        } else {
879
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
880
        }
881
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
882
            if (empty($options['appType'])) {
883
                $appType = App::$cur->type;
@@ 943-947 (lines=5) @@
940
        } else {
941
            $appType = $options['appType'];
942
        }
943
        if (!empty(static::$storage['options']['share'])) {
944
            $moduleConfig = Config::share($classPath[0]);
945
        } else {
946
            $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
947
        }
948
        if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
949
            $items = $moduleConfig['storage'][$appType][$classPath[1]];
950
            if (empty($options['where'])) {