Code Duplication    Length = 10-10 lines in 2 locations

code/reports/SearchableOrderReport.php 2 locations

@@ 87-96 (lines=10) @@
84
                        $where[] = " {$bt}Order{$bt}.{$bt}ID{$bt} = ".intval($value);
85
                        $humanWhere[] = ' OrderID equals '.intval($value);
86
                        break;
87
                    case "From":
88
                        $d = new Date("date");
89
                        $d->setValue($value);
90
                        $t = new Time("time");
91
                        $cleanTime = trim(preg_replace('/([ap]m)/', "", Convert::raw2sql($_REQUEST["FromTime"])));
92
                        $t->setValue($cleanTime); //
93
                        $exactTime = strtotime($d->format("Y-m-d")." ".$t->Nice24());
94
                        $where[] = " UNIX_TIMESTAMP({$bt}Order{$bt}.{$bt}Created{$bt}) >= '".$exactTime."'";
95
                        $humanWhere[] = ' Order on or after '.Date("r", $exactTime);//r = Example: Thu, 21 Dec 2000 16:01:07 +0200 // also consider: l jS \of F Y H:i Z(e)
96
                        break;
97
                    case "Until":
98
                        $d = new Date("date");
99
                        $d->setValue($value);
@@ 97-106 (lines=10) @@
94
                        $where[] = " UNIX_TIMESTAMP({$bt}Order{$bt}.{$bt}Created{$bt}) >= '".$exactTime."'";
95
                        $humanWhere[] = ' Order on or after '.Date("r", $exactTime);//r = Example: Thu, 21 Dec 2000 16:01:07 +0200 // also consider: l jS \of F Y H:i Z(e)
96
                        break;
97
                    case "Until":
98
                        $d = new Date("date");
99
                        $d->setValue($value);
100
                        $t = new Time("time");
101
                        $cleanTime = trim(preg_replace('/([ap]m)/', "", Convert::raw2sql($_REQUEST["FromTime"])));
102
                        $t->setValue($cleanTime); //
103
                        $exactTime = strtotime($d->format("Y-m-d")." ".$t->Nice24());
104
                        $where[] = " UNIX_TIMESTAMP({$bt}Order{$bt}.{$bt}Created{$bt}) <= '".$exactTime."'";
105
                        $humanWhere[] = ' Order before or on '.Date("r", $exactTime);//r = Example: Thu, 21 Dec 2000 16:01:07 +0200 // also consider: l jS \of F Y H:i Z(e)
106
                        break;
107
                    case "Email":
108
                        $where[] = " {$bt}Member{$bt}.{$bt}Email{$bt} = '".$value."'";
109
                        $humanWhere[] = ' Customer Email equals "'.$value.'"';