Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1414-1419 (lines=6) @@
1411
            $storage[$classPath[1]] = [];
1412
        }
1413
        if ($id) {
1414
            foreach ($storage[$classPath[1]] as $key => $item) {
1415
                if ($item[$col] == $id) {
1416
                    $storage[$classPath[1]][$key] = $this->_params;
1417
                    break;
1418
                }
1419
            }
1420
        } else {
1421
            $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1422
            $this->$col = $id;
@@ 1620-1626 (lines=7) @@
1617
        if (empty($storage[$classPath[1]])) {
1618
            $storage[$classPath[1]] = [];
1619
        }
1620
        foreach ($storage[$classPath[1]] as $key => $item) {
1621
1622
            if ($item[$col] == $id) {
1623
                unset($storage[$classPath[1]][$key]);
1624
                break;
1625
            }
1626
        }
1627
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1628
            $moduleConfig['storage'][$appType] = $storage;
1629
        } else {