Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1394-1399 (lines=6) @@
1391
            $storage[$classPath[1]] = [];
1392
        }
1393
        if ($id) {
1394
            foreach ($storage[$classPath[1]] as $key => $item) {
1395
                if ($item[$col] == $id) {
1396
                    $storage[$classPath[1]][$key] = $this->_params;
1397
                    break;
1398
                }
1399
            }
1400
        } else {
1401
            $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1402
            $this->$col = $id;
@@ 1596-1602 (lines=7) @@
1593
        if (empty($storage[$classPath[1]])) {
1594
            $storage[$classPath[1]] = [];
1595
        }
1596
        foreach ($storage[$classPath[1]] as $key => $item) {
1597
1598
            if ($item[$col] == $id) {
1599
                unset($storage[$classPath[1]][$key]);
1600
                break;
1601
            }
1602
        }
1603
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1604
            $moduleConfig['storage'][$appType] = $storage;
1605
        } else {