Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 919-923 (lines=5) @@
916
      return false;
917
    }
918
    $classPath = explode('\\', get_called_class());
919
    if (!empty(static::$storage['options']['share'])) {
920
      $moduleConfig = Config::share($classPath[0]);
921
    } else {
922
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
923
    }
924
    $appType = App::$cur->type;
925
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
926
      if (!empty($options['appType'])) {
@@ 960-964 (lines=5) @@
957
   */
958
  public static function getListFromModuleStorage($options = []) {
959
    $classPath = explode('\\', get_called_class());
960
    if (!empty(static::$storage['options']['share'])) {
961
      $moduleConfig = Config::share($classPath[0]);
962
    } else {
963
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
964
    }
965
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
966
      if (empty($options['appType'])) {
967
        $appType = App::$cur->type;
@@ 1026-1030 (lines=5) @@
1023
    } else {
1024
      $appType = $options['appType'];
1025
    }
1026
    if (!empty(static::$storage['options']['share'])) {
1027
      $moduleConfig = Config::share($classPath[0]);
1028
    } else {
1029
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1030
    }
1031
    if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1032
      $items = $moduleConfig['storage'][$appType][$classPath[1]];
1033
      if (empty($options['where'])) {
@@ 1248-1252 (lines=5) @@
1245
    $appType = '';
1246
    $classPath = explode('\\', get_called_class());
1247
1248
    if (!empty(static::$storage['options']['share'])) {
1249
      $moduleConfig = Config::share($classPath[0]);
1250
    } else {
1251
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1252
    }
1253
1254
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1255
      if (empty($options['appType'])) {
@@ 1451-1455 (lines=5) @@
1448
    $id = $this->pk();
1449
    $appType = '';
1450
    $classPath = explode('\\', get_called_class());
1451
    if (!empty(static::$storage['options']['share'])) {
1452
      $moduleConfig = Config::share($classPath[0]);
1453
    } else {
1454
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1455
    }
1456
1457
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1458
      if (empty($options['appType'])) {