Code Duplication    Length = 10-11 lines in 2 locations

src/Resource/Refund.php 2 locations

@@ 351-360 (lines=10) @@
348
        $this->payment = $payment;
349
    }
350
351
    public function bankAccount($resourceId, BankAccount $bankAccount, $amount = null)
352
    {
353
        $data = $this->bankAccountData($bankAccount);
354
355
        if (!is_null($amount)) {
356
            $data->amount = $amount;
357
        }
358
359
        return $this->execute($data, $resourceId);
360
    }
361
362
    public function creditCard($resourceId, $amount = null)
363
    {
@@ 362-372 (lines=11) @@
359
        return $this->execute($data, $resourceId);
360
    }
361
362
    public function creditCard($resourceId, $amount = null)
363
    {
364
        if (!is_null($amount)) {
365
            $data = new stdClass();
366
            $data->amount = $amount;
367
368
            return $this->execute($data, $resourceId);
369
        }
370
371
        return $this->execute(null, $resourceId);
372
    }
373
374
    private function isOrder($resourceId)
375
    {