Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 275-290 (lines=16) @@
272
      foreach ($this->managerOptions['filters'] as $col) {
273
        $colInfo = $modelName::getColInfo($col);
274
        switch ($colInfo['colParams']['type']) {
275
          case 'select':
276
            if (empty($params['filters'][$col]['value'])) {
277
              continue;
278
            }
279
            if (is_array($params['filters'][$col]['value'])) {
280
              foreach ($params['filters'][$col]['value'] as $key => $value) {
281
                if ($value === '') {
282
                  unset($params['filters'][$col]['value'][$key]);
283
                }
284
              }
285
            }
286
            if (!$params['filters'][$col]['value']) {
287
              continue;
288
            }
289
            $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
290
            break;
291
          case 'bool':
292
293
            if (!isset($params['filters'][$col]['value']) || $params['filters'][$col]['value'] === '') {
@@ 546-561 (lines=16) @@
543
      foreach ($this->managerOptions['filters'] as $col) {
544
        $colInfo = $modelName::getColInfo($col);
545
        switch ($colInfo['colParams']['type']) {
546
          case 'select':
547
            if (empty($params['filters'][$col]['value'])) {
548
              continue;
549
            }
550
            if (is_array($params['filters'][$col]['value'])) {
551
              foreach ($params['filters'][$col]['value'] as $key => $value) {
552
                if ($value === '') {
553
                  unset($params['filters'][$col]['value'][$key]);
554
                }
555
              }
556
            }
557
            if (!$params['filters'][$col]['value']) {
558
              continue;
559
            }
560
            $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
561
            break;
562
          case 'bool':
563
564
            if (empty($params['filters'][$col]['value'])) {