Code Duplication    Length = 10-11 lines in 2 locations

src/Resource/Refund.php 2 locations

@@ 339-348 (lines=10) @@
336
        $this->payment = $payment;
337
    }
338
339
    public function bankAccount($resourceId, BankAccount $bankAccount, $amount = null)
340
    {
341
        $data = $this->bankAccountData($bankAccount);
342
343
        if (!is_null($amount)) {
344
            $data->amount = $amount;
345
        }
346
347
        return $this->execute($data, $resourceId);
348
    }
349
350
    public function creditCard($resourceId, $amount = null)
351
    {
@@ 350-360 (lines=11) @@
347
        return $this->execute($data, $resourceId);
348
    }
349
350
    public function creditCard($resourceId, $amount = null)
351
    {
352
        if (!is_null($amount)) {
353
            $data = new stdClass();
354
            $data->amount = $amount;
355
356
            return $this->execute($data, $resourceId);
357
        }
358
359
        return $this->execute(null, $resourceId);
360
    }
361
362
    private function isOrder($resourceId)
363
    {