Code Duplication    Length = 6-7 lines in 2 locations

system/Inji/Model.php 2 locations

@@ 1164-1169 (lines=6) @@
1161
            $storage[$classPath[1]] = [];
1162
        }
1163
        if ($id) {
1164
            foreach ($storage[$classPath[1]] as $key => $item) {
1165
                if ($item[$col] == $id) {
1166
                    $storage[$classPath[1]][$key] = $this->_params;
1167
                    break;
1168
                }
1169
            }
1170
        } else {
1171
            $id = !empty($storage['scheme'][$classPath[1]]['ai']) ? $storage['scheme'][$classPath[1]]['ai'] : 1;
1172
            $this->$col = $id;
@@ 1366-1372 (lines=7) @@
1363
        if (empty($storage[$classPath[1]])) {
1364
            $storage[$classPath[1]] = [];
1365
        }
1366
        foreach ($storage[$classPath[1]] as $key => $item) {
1367
1368
            if ($item[$col] == $id) {
1369
                unset($storage[$classPath[1]][$key]);
1370
                break;
1371
            }
1372
        }
1373
        if (!empty($moduleConfig['storage']['appTypeSplit'])) {
1374
            $moduleConfig['storage'][$appType] = $storage;
1375
        } else {