Code Duplication    Length = 6-7 lines in 2 locations

code/model/process/OrderStatusLog_SecurityCheck.php 2 locations

@@ 281-286 (lines=6) @@
278
                )
279
            )
280
            ->exclude(array('ID' => $order->ID));
281
        foreach ($otherOrders as $otherOrder) {
282
            if (!isset($similarArray[$otherOrder->ID])) {
283
                $similarArray[$otherOrder->ID] = array();
284
            }
285
            $similarArray[$otherOrder->ID]["Email"] = $otherOrder;
286
        }
287
        //check emails from billing address
288
        $emailArray = array();
289
        if ($billingAddress) {
@@ 298-304 (lines=7) @@
295
        $otherBillingAddresses = BillingAddress::get()->filter(
296
            array('Email' => $emailArray) + $timeFilter
297
        )->exclude(array('OrderID' => $order->ID));
298
        foreach ($otherBillingAddresses as $address) {
299
            $otherOrder = $address->Order();
300
            if (!isset($similarArray[$otherOrder->ID])) {
301
                $similarArray[$otherOrder->ID] = array();
302
            }
303
            $similarArray[$otherOrder->ID]["Email"] = $otherOrder;
304
        }
305
        //adding all emails to security checks
306
        $this->blacklistCheck($emailArray, 'EcommerceSecurityEmail');
307