Code Duplication    Length = 7-7 lines in 4 locations

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

@@ 330-336 (lines=7) @@
327
        );
328
    }
329
330
    public function delete($token)
331
    {
332
        $this->_validateId($token);
333
        $path = $this->_config->merchantPath() . '/payment_methods/credit_card/' . $token;
334
        $this->_http->delete($path);
335
        return new Result\Successful();
336
    }
337
338
    private static function baseOptions()
339
    {

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

@@ 250-256 (lines=7) @@
247
     *
248
     * @param string $customerId
249
     */
250
    public function delete($customerId)
251
    {
252
        $this->_validateId($customerId);
253
        $path = $this->_config->merchantPath() . '/customers/' . $customerId;
254
        $this->_http->delete($path);
255
        return new Result\Successful();
256
    }
257
258
    /**
259
     * create a new sale for a customer

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

@@ 93-99 (lines=7) @@
90
        return $this->_doUpdate('/payment_methods/any/' . $token, ['payment_method' => $attribs]);
91
    }
92
93
    public function delete($token)
94
    {
95
        $this->_validateId($token);
96
        $path = $this->_config->merchantPath() . '/payment_methods/any/' . $token;
97
        $this->_http->delete($path);
98
        return new Result\Successful();
99
    }
100
101
    public function grant($sharedPaymentMethodToken, $allowVaulting)
102
    {

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

@@ 80-86 (lines=7) @@
77
        return $this->_doUpdate('put', '/payment_methods/paypal_account/' . $token, ['paypalAccount' => $attributes]);
78
    }
79
80
    public function delete($token)
81
    {
82
        $this->_validateId($token);
83
        $path = $this->_config->merchantPath() . '/payment_methods/paypal_account/' . $token;
84
        $this->_http->delete($path);
85
        return new Result\Successful();
86
    }
87
88
    /**
89
     * create a new sale for the current PayPal account