Code Duplication    Length = 9-10 lines in 2 locations

code/dod/ComplexPriceBuyableDecorator.php 2 locations

@@ 132-141 (lines=10) @@
129
                    }
130
131
                    // Does it pass the date filter?
132
                    if ($priceCanBeUsed) {
133
                        $nowTS = strtotime("now");
134
                        if ($price->From) {
135
                            $priceCanBeUsed = false;
136
                            $fromTS = strtotime($price->From);
137
                            if ($fromTS && $fromTS < $nowTS) {
138
                                $priceCanBeUsed = true;
139
                            }
140
                        }
141
                    }
142
143
                    if ($priceCanBeUsed) {
144
                        if ($price->Until) {
@@ 143-151 (lines=9) @@
140
                        }
141
                    }
142
143
                    if ($priceCanBeUsed) {
144
                        if ($price->Until) {
145
                            $priceCanBeUsed = false;
146
                            $untilTS = strtotime($price->Until);
147
                            if ($untilTS && $untilTS > $nowTS) {
148
                                $priceCanBeUsed = true;
149
                            }
150
                        }
151
                    }
152
153
                    // If so, apply the price
154
                    if ($priceCanBeUsed) {