Code Duplication    Length = 5-5 lines in 5 locations

system/Inji/Model.php 5 locations

@@ 1030-1034 (lines=5) @@
1027
      return false;
1028
    }
1029
    $classPath = explode('\\', get_called_class());
1030
    if (!empty(static::$storage['options']['share'])) {
1031
      $moduleConfig = Config::share($classPath[0]);
1032
    } else {
1033
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1034
    }
1035
    $appType = App::$cur->type;
1036
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1037
      if (!empty($options['appType'])) {
@@ 1071-1075 (lines=5) @@
1068
   */
1069
  public static function getListFromModuleStorage($options = []) {
1070
    $classPath = explode('\\', get_called_class());
1071
    if (!empty(static::$storage['options']['share'])) {
1072
      $moduleConfig = Config::share($classPath[0]);
1073
    } else {
1074
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1075
    }
1076
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1077
      if (empty($options['appType'])) {
1078
        $appType = App::$cur->type;
@@ 1137-1141 (lines=5) @@
1134
    } else {
1135
      $appType = $options['appType'];
1136
    }
1137
    if (!empty(static::$storage['options']['share'])) {
1138
      $moduleConfig = Config::share($classPath[0]);
1139
    } else {
1140
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1141
    }
1142
    if (!empty($moduleConfig['storage'][$appType][$classPath[1]])) {
1143
      $items = $moduleConfig['storage'][$appType][$classPath[1]];
1144
      if (empty($options['where'])) {
@@ 1359-1363 (lines=5) @@
1356
    $appType = '';
1357
    $classPath = explode('\\', get_called_class());
1358
1359
    if (!empty(static::$storage['options']['share'])) {
1360
      $moduleConfig = Config::share($classPath[0]);
1361
    } else {
1362
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1363
    }
1364
1365
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1366
      if (empty($options['appType'])) {
@@ 1562-1566 (lines=5) @@
1559
    $id = $this->pk();
1560
    $appType = '';
1561
    $classPath = explode('\\', get_called_class());
1562
    if (!empty(static::$storage['options']['share'])) {
1563
      $moduleConfig = Config::share($classPath[0]);
1564
    } else {
1565
      $moduleConfig = Config::module($classPath[0], strpos(static::$storage['type'], 'system') !== false);
1566
    }
1567
1568
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1569
      if (empty($options['appType'])) {