Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 252-256 (lines=5) @@
249
        $this->_set('creditCards', $creditCardArray);
250
251
        $coinbaseAccountArray = [];
252
        if (isset($customerAttribs['coinbaseAccounts'])) {
253
            foreach ($customerAttribs['coinbaseAccounts'] AS $coinbaseAccount) {
254
                $coinbaseAccountArray[] = CoinbaseAccount::factory($coinbaseAccount);
255
            }
256
        }
257
        $this->_set('coinbaseAccounts', $coinbaseAccountArray);
258
259
        $paypalAccountArray = [];

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

@@ 437-441 (lines=5) @@
434
435
        // map each coinbaseAccount into its own object
436
        $coinbaseAccountArray = [];
437
        if (isset($customerAttribs['coinbaseAccounts'])) {
438
            foreach ($customerAttribs['coinbaseAccounts'] AS $coinbaseAccount) {
439
                $coinbaseAccountArray[] = CoinbaseAccount::factory($coinbaseAccount);
440
            }
441
        }
442
        $this->_set('coinbaseAccounts', $coinbaseAccountArray);
443
444
        // map each paypalAccount into its own object