Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1268-1273 (lines=6) @@
1265
      $storage[$classPath[1]] = [];
1266
    }
1267
    if ($id) {
1268
      foreach ($storage[$classPath[1]] as $key => $item) {
1269
        if ($item[$col] == $id) {
1270
          $storage[$classPath[1]][$key] = $this->_params;
1271
          break;
1272
        }
1273
      }
1274
    } else {
1275
      $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1276
      $this->$col = $id;
@@ 1470-1476 (lines=7) @@
1467
    if (empty($storage[$classPath[1]])) {
1468
      $storage[$classPath[1]] = [];
1469
    }
1470
    foreach ($storage[$classPath[1]] as $key => $item) {
1471
1472
      if ($item[$col] == $id) {
1473
        unset($storage[$classPath[1]][$key]);
1474
        break;
1475
      }
1476
    }
1477
    if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1478
      $moduleConfig['storage'][$appType] = $storage;
1479
    } else {