Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1297-1302 (lines=6) @@
1294
            $storage[$classPath[1]] = [];
1295
        }
1296
        if ($id) {
1297
            foreach ($storage[$classPath[1]] as $key => $item) {
1298
                if ($item[$col] == $id) {
1299
                    $storage[$classPath[1]][$key] = $this->_params;
1300
                    break;
1301
                }
1302
            }
1303
        } else {
1304
            $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1305
            $this->$col = $id;
@@ 1487-1493 (lines=7) @@
1484
        if (empty($storage[$classPath[1]])) {
1485
            $storage[$classPath[1]] = [];
1486
        }
1487
        foreach ($storage[$classPath[1]] as $key => $item) {
1488
1489
            if ($item[$col] == $id) {
1490
                unset($storage[$classPath[1]][$key]);
1491
                break;
1492
            }
1493
        }
1494
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1495
            $moduleConfig['storage'][$appType] = $storage;
1496
        } else {