Code Duplication    Length = 11-11 lines in 2 locations

src/Resource/Payment.php 2 locations

@@ 615-625 (lines=11) @@
612
     *
613
     * @return Payment
614
     */
615
    public function capture()
616
    {
617
        $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::PATH, $this->getId(), 'capture');
618
        if ($this->isMultipayment($this->getId())) {
619
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::MULTI_PAYMENTS_PATH, $this->getId(), 'capture');
620
        }
621
622
        $response = $this->httpRequest($path, Requests::POST, $this);
623
624
        return $this->populate($response);
625
    }
626
627
    /**
628
     * Cancel a pre-authorized amount on a credit card payment.
@@ 634-644 (lines=11) @@
631
     *
632
     * @return Payment
633
     */
634
    public function cancel()
635
    {
636
        $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::PATH, $this->getId(), 'void');
637
        if ($this->isMultipayment($this->getId())) {
638
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::MULTI_PAYMENTS_PATH, $this->getId(), 'void');
639
        }
640
641
        $response = $this->httpRequest($path, Requests::POST, $this);
642
643
        return $this->populate($response);
644
    }
645
646
    /**
647
     * Cancel a pre-authorized amount on a credit card payment.