Code Duplication    Length = 6-6 lines in 2 locations

catalog/includes/apps/braintree/lib/Braintree/Customer.php 1 location

@@ 235-240 (lines=6) @@
232
        $this->_attributes = $customerAttribs;
233
234
        $addressArray = [];
235
        if (isset($customerAttribs['addresses'])) {
236
237
            foreach ($customerAttribs['addresses'] AS $address) {
238
                $addressArray[] = Address::factory($address);
239
            }
240
        }
241
        $this->_set('addresses', $addressArray);
242
243
        $creditCardArray = [];

catalog/includes/apps/braintree/lib/Braintree/CustomerGateway.php 1 location

@@ 418-423 (lines=6) @@
415
416
        // map each address into its own object
417
        $addressArray = [];
418
        if (isset($customerAttribs['addresses'])) {
419
420
            foreach ($customerAttribs['addresses'] AS $address) {
421
                $addressArray[] = Address::factory($address);
422
            }
423
        }
424
        $this->_set('addresses', $addressArray);
425
426
        // map each creditCard into its own object