Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 278-293 (lines=16) @@
275
            foreach ($this->managerOptions['filters'] as $col) {
276
                $colInfo = $modelName::getColInfo($col);
277
                switch ($colInfo['colParams']['type']) {
278
                    case 'select':
279
                        if (empty($params['filters'][$col]['value'])) {
280
                            continue;
281
                        }
282
                        if (is_array($params['filters'][$col]['value'])) {
283
                            foreach ($params['filters'][$col]['value'] as $key => $value) {
284
                                if ($value === '') {
285
                                    unset($params['filters'][$col]['value'][$key]);
286
                                }
287
                            }
288
                        }
289
                        if (!$params['filters'][$col]['value']) {
290
                            continue;
291
                        }
292
                        $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
293
                        break;
294
                    case 'bool':
295
296
                        if (!isset($params['filters'][$col]['value']) || $params['filters'][$col]['value'] === '') {
@@ 579-594 (lines=16) @@
576
            foreach ($this->managerOptions['filters'] as $col) {
577
                $colInfo = $modelName::getColInfo($col);
578
                switch ($colInfo['colParams']['type']) {
579
                    case 'select':
580
                        if (empty($params['filters'][$col]['value'])) {
581
                            continue;
582
                        }
583
                        if (is_array($params['filters'][$col]['value'])) {
584
                            foreach ($params['filters'][$col]['value'] as $key => $value) {
585
                                if ($value === '') {
586
                                    unset($params['filters'][$col]['value'][$key]);
587
                                }
588
                            }
589
                        }
590
                        if (!$params['filters'][$col]['value']) {
591
                            continue;
592
                        }
593
                        $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
594
                        break;
595
                    case 'bool':
596
597
                        if (empty($params['filters'][$col]['value'])) {