Code Duplication    Length = 6-7 lines in 2 locations

code/model/process/OrderStatusLog_SecurityCheck.php 2 locations

@@ 242-247 (lines=6) @@
239
        $otherOrders = Order::get()->filter(
240
            array('MemberID' => $member->ID) + $timeFilter
241
        )->exclude(array('ID' => $order->ID));
242
        foreach ($otherOrders as $otherOrder) {
243
            if (!isset($similarArray[$otherOrder->ID])) {
244
                $similarArray[$otherOrder->ID] = array();
245
            }
246
            $similarArray[$otherOrder->ID]["Email"] = $otherOrder;
247
        }
248
        //check emails from billing address
249
        $emailArray = array();
250
        if ($billingAddress) {
@@ 259-265 (lines=7) @@
256
        $otherBillingAddresses = BillingAddress::get()->filter(
257
            array('Email' => $emailArray) + $timeFilter
258
        )->exclude(array('OrderID' => $order->ID));
259
        foreach ($otherBillingAddresses as $address) {
260
            $otherOrder = $address->Order();
261
            if (!isset($similarArray[$otherOrder->ID])) {
262
                $similarArray[$otherOrder->ID] = array();
263
            }
264
            $similarArray[$otherOrder->ID]["Email"] = $otherOrder;
265
        }
266
        //adding all emails to security checks
267
        $this->blacklistCheck($emailArray, 'EcommerceSecurityEmail');
268