Code Duplication    Length = 11-11 lines in 2 locations

src/Resource/Payment.php 2 locations

@@ 625-635 (lines=11) @@
622
     *
623
     * @return Payment
624
     */
625
    public function capture()
626
    {
627
        $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::PATH, $this->getId(), 'capture');
628
        if ($this->isMultipayment($this->getId())) {
629
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::MULTI_PAYMENTS_PATH, $this->getId(), 'capture');
630
        }
631
632
        $response = $this->httpRequest($path, Requests::POST, $this);
633
634
        return $this->populate($response);
635
    }
636
637
    /**
638
     * Cancel a pre-authorized amount on a credit card payment.
@@ 644-654 (lines=11) @@
641
     *
642
     * @return Payment
643
     */
644
    public function cancel()
645
    {
646
        $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::PATH, $this->getId(), 'void');
647
        if ($this->isMultipayment($this->getId())) {
648
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::MULTI_PAYMENTS_PATH, $this->getId(), 'void');
649
        }
650
651
        $response = $this->httpRequest($path, Requests::POST, $this);
652
653
        return $this->populate($response);
654
    }
655
656
    /**
657
     * Cancel a pre-authorized amount on a credit card payment.