Code Duplication    Length = 6-6 lines in 2 locations

src/Http/Api/ReportController.php 2 locations

@@ 697-702 (lines=6) @@
694
                    $cond['$lte'] = strtotime($sections[1] . ' 23:59:59');
695
                    $end_stat_time = min([ $end_stat_time, $cond['$lte'] ]);
696
                }
697
                if ($cond) {
698
                    $or[] = [ 'created_at' =>  $cond ];
699
                    $or[] = [ 'resolved_at' =>  $cond ];
700
                    $or[] = [ 'closed_at' => $cond ];
701
                }
702
            }
703
            else
704
            {
705
                $unitMap = [ 'w' => 'week', 'm' => 'month', 'y' => 'year' ];
@@ 721-726 (lines=6) @@
718
                        $cond['$gte'] = $time_val;
719
                        $start_stat_time = max([ $start_stat_time, $cond['$gte'] ]);
720
                    }
721
                    if ($cond) {
722
                        $or[] = [ 'created_at' =>  $cond ];
723
                        $or[] = [ 'resolved_at' =>  $cond ];
724
                        $or[] = [ 'closed_at' => $cond ];
725
                    }
726
                }
727
            }
728
729
            if (!$is_accu && $or) {