Code Duplication    Length = 5-5 lines in 2 locations

code/reports/SearchableOrderReport.php 1 location

@@ 52-56 (lines=5) @@
49
        if ($this->statistic("count") > 3) {
50
            $fields->push(new LiteralField("stats", '<h2>Payment Statistics</h2><ul><li>'.implode('</li><li>', $stats).'</li></ul>'));
51
        }
52
        if ($humanWhere = Session::get("SearchableOrderReport.humanWhere")) {
53
            $fields->push(new LiteralField("humanWhere", "<p>Current Search: ".$humanWhere."</p>"), "ReportDescription");
54
            $fields->removeByName("ReportDescription");
55
            $fields->push(new FormAction('clearSearch', 'Clear Search'));
56
        }
57
        $fields->push(new CheckboxSetField("Status", "Order Status", OrderDecorator::get_order_status_options()));
58
        $fields->push(new NumericField("OrderID", "Order ID"));
59
        $fields->push(new DateField("From", "From..."));

code/reports/SearchablePaymentReport.php 1 location

@@ 51-55 (lines=5) @@
48
        if ($this->statistic("count") > 3) {
49
            $fields->addFieldToTab("Root.Report", new LiteralField("stats", '<h2>Payment Statistics</h2><ul><li>'.implode('</li><li>', $stats).'</li></ul>'));
50
        }
51
        if ($humanWhere = Session::get("SearchablePaymentReport.humanWhere")) {
52
            $fields->addFieldToTab("Root.Report", new LiteralField("humanWhere", "<p>Current Search: ".$humanWhere."</p>"), "ReportDescription");
53
            $fields->removeByName("ReportDescription");
54
            $fields->addFieldToTab("Root.Search", new FormAction('clearSearch', 'Clear Search'));
55
        }
56
        $paymentStatusList = singleton('Payment')->dbObject('Status')->enumValues();
57
        $dropDownValues = array();
58
        foreach ($paymentStatusList as $paymentStatus) {