Code Duplication    Length = 16-16 lines in 2 locations

system/modules/Ui/objects/DataManager.php 2 locations

@@ 265-280 (lines=16) @@
262
            foreach ($this->managerOptions['filters'] as $col) {
263
                $colInfo = $modelName::getColInfo($col);
264
                switch ($colInfo['colParams']['type']) {
265
                    case 'select':
266
                        if (empty($params['filters'][$col]['value'])) {
267
                            continue;
268
                        }
269
                        if (is_array($params['filters'][$col]['value'])) {
270
                            foreach ($params['filters'][$col]['value'] as $key => $value) {
271
                                if ($value === '') {
272
                                    unset($params['filters'][$col]['value'][$key]);
273
                                }
274
                            }
275
                        }
276
                        if (!$params['filters'][$col]['value']) {
277
                            continue;
278
                        }
279
                        $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
280
                        break;
281
                    case 'bool':
282
283
                        if (!isset($params['filters'][$col]['value']) || $params['filters'][$col]['value'] === '') {
@@ 539-554 (lines=16) @@
536
            foreach ($this->managerOptions['filters'] as $col) {
537
                $colInfo = $modelName::getColInfo($col);
538
                switch ($colInfo['colParams']['type']) {
539
                    case 'select':
540
                        if (empty($params['filters'][$col]['value'])) {
541
                            continue;
542
                        }
543
                        if (is_array($params['filters'][$col]['value'])) {
544
                            foreach ($params['filters'][$col]['value'] as $key => $value) {
545
                                if ($value === '') {
546
                                    unset($params['filters'][$col]['value'][$key]);
547
                                }
548
                            }
549
                        }
550
                        if (!$params['filters'][$col]['value']) {
551
                            continue;
552
                        }
553
                        $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
554
                        break;
555
                    case 'bool':
556
557
                        if (empty($params['filters'][$col]['value'])) {