Code Duplication    Length = 8-10 lines in 4 locations

system/Inji/Model.php 4 locations

@@ 1036-1043 (lines=8) @@
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'])) {
1038
        $appType = $options['appType'];
1039
      }
1040
      $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1041
    } else {
1042
      $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1043
    }
1044
    if (!empty($storage[$classPath[1]])) {
1045
      $items = $storage[$classPath[1]];
1046
      $class = get_called_class();
@@ 1076-1085 (lines=10) @@
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;
1079
      } else {
1080
        $appType = $options['appType'];
1081
      }
1082
      $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1083
    } else {
1084
      $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1085
    }
1086
    if (!empty($storage[$classPath[1]])) {
1087
      $items = [];
1088
      $class = get_called_class();
@@ 1365-1374 (lines=10) @@
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'])) {
1367
        $appType = App::$cur->type;
1368
      } else {
1369
        $appType = $options['appType'];
1370
      }
1371
      $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1372
    } else {
1373
      $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1374
    }
1375
    if (empty($storage[$classPath[1]])) {
1376
      $storage[$classPath[1]] = [];
1377
    }
@@ 1568-1577 (lines=10) @@
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'])) {
1570
        $appType = App::$cur->type;
1571
      } else {
1572
        $appType = $options['appType'];
1573
      }
1574
      $storage = !empty($moduleConfig['storage'][$appType]) ? $moduleConfig['storage'][$appType] : [];
1575
    } else {
1576
      $storage = !empty($moduleConfig['storage']) ? $moduleConfig['storage'] : [];
1577
    }
1578
    if (empty($storage[$classPath[1]])) {
1579
      $storage[$classPath[1]] = [];
1580
    }