Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 268-272 (lines=5) @@
265
        $this->_set('paypalAccounts', $paypalAccountArray);
266
267
        $applePayCardArray = [];
268
        if (isset($customerAttribs['applePayCards'])) {
269
            foreach ($customerAttribs['applePayCards'] AS $applePayCard) {
270
                $applePayCardArray[] = ApplePayCard::factory($applePayCard);
271
            }
272
        }
273
        $this->_set('applePayCards', $applePayCardArray);
274
275
        $androidPayCardArray = [];

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

@@ 455-459 (lines=5) @@
452
453
        // map each applePayCard into its own object
454
        $applePayCardArray = [];
455
        if (isset($customerAttribs['applePayCards'])) {
456
            foreach ($customerAttribs['applePayCards'] AS $applePayCard) {
457
                $applePayCardArray[] = ApplePayCard::factory($applePayCard);
458
            }
459
        }
460
        $this->_set('applePayCards', $applePayCardArray);
461
462
        // map each androidPayCard into its own object