Code Duplication    Length = 16-16 lines in 2 locations

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

@@ 286-301 (lines=16) @@
283
      foreach ($this->managerOptions['filters'] as $col) {
284
        $colInfo = $modelName::getColInfo($col);
285
        switch ($colInfo['colParams']['type']) {
286
          case 'select':
287
            if (empty($params['filters'][$col]['value'])) {
288
              continue;
289
            }
290
            if (is_array($params['filters'][$col]['value'])) {
291
              foreach ($params['filters'][$col]['value'] as $key => $value) {
292
                if ($value === '') {
293
                  unset($params['filters'][$col]['value'][$key]);
294
                }
295
              }
296
            }
297
            if (!$params['filters'][$col]['value']) {
298
              continue;
299
            }
300
            $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
301
            break;
302
          case 'bool':
303
304
            if (!isset($params['filters'][$col]['value']) || $params['filters'][$col]['value'] === '') {
@@ 590-605 (lines=16) @@
587
      foreach ($this->managerOptions['filters'] as $col) {
588
        $colInfo = $modelName::getColInfo($col);
589
        switch ($colInfo['colParams']['type']) {
590
          case 'select':
591
            if (empty($params['filters'][$col]['value'])) {
592
              continue;
593
            }
594
            if (is_array($params['filters'][$col]['value'])) {
595
              foreach ($params['filters'][$col]['value'] as $key => $value) {
596
                if ($value === '') {
597
                  unset($params['filters'][$col]['value'][$key]);
598
                }
599
              }
600
            }
601
            if (!$params['filters'][$col]['value']) {
602
              continue;
603
            }
604
            $queryParams['where'][] = [$col, $params['filters'][$col]['value'], is_array($params['filters'][$col]['value']) ? 'IN' : '='];
605
            break;
606
          case 'bool':
607
608
            if (empty($params['filters'][$col]['value'])) {