Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1454-1459 (lines=6) @@
1451
            $storage[$classPath[1]] = [];
1452
        }
1453
        if ($id) {
1454
            foreach ($storage[$classPath[1]] as $key => $item) {
1455
                if ($item[$col] == $id) {
1456
                    $storage[$classPath[1]][$key] = $this->_params;
1457
                    break;
1458
                }
1459
            }
1460
        } else {
1461
            $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1462
            $this->$col = $id;
@@ 1660-1666 (lines=7) @@
1657
        if (empty($storage[$classPath[1]])) {
1658
            $storage[$classPath[1]] = [];
1659
        }
1660
        foreach ($storage[$classPath[1]] as $key => $item) {
1661
1662
            if ($item[$col] == $id) {
1663
                unset($storage[$classPath[1]][$key]);
1664
                break;
1665
            }
1666
        }
1667
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1668
            $moduleConfig['storage'][$appType] = $storage;
1669
        } else {