Completed
Push — master ( 2d17ac...dc6fd0 )
by Gregorio
02:39
created

VoidRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 55.56%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
ccs 5
cts 9
cp 0.5556
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getData() 0 6 1
A getEndpoint() 0 4 1
1
<?php
2
3
namespace Omnipay\Spreedly\Message;
4
5
/**
6
 * @method Response send()
7
 */
8
class VoidRequest extends AbstractRequest
9
{
10
    /**
11
     * @return null
12
     * @throws \Omnipay\Common\Exception\InvalidRequestException
13
     */
14 6
    public function getData()
15
    {
16 6
        $this->validate('transactionReference');
17
18 6
        return null;
19
    }
20
21
    /**
22
     * @return string
23
     */
24 6
    public function getEndpoint()
25
    {
26 6
        return $this->endpoint . 'transactions/' . $this->getTransactionReference() . '/void';
27
    }
28
}
29