Completed
Push — master ( e98615...4a03fb )
by Gregorio
02:16
created

FetchPaymentMethodRequest::getHttpMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1.125

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 4
cp 0.5
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1.125
1
<?php
2
3
namespace Omnipay\Spreedly\Message;
4
5
/**
6
 * @method Response send()
7
 */
8 View Code Duplication
class FetchPaymentMethodRequest extends AbstractPaymentMethodRequest
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * @return null
12
     * @throws \Omnipay\Common\Exception\InvalidRequestException
13
     */
14 4
    public function getData()
15
    {
16 4
        $this->validate('payment_method_token');
17
18 4
        return null;
19
    }
20
21
    /**
22
     * @return string
23
     */
24 4
    public function getEndpoint()
25
    {
26 4
        return $this->endpoint . 'payment_methods/' . $this->getPaymentMethodToken();
27
    }
28
29
    /**
30
     * @return string
31
     */
32 2
    public function getHttpMethod()
33
    {
34 2
        return 'GET';
35
    }
36
}
37