Completed
Push — master ( 2a8373...bfc208 )
by Andreas
03:38
created

Delete   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 3
Bugs 2 Features 3
Metric Value
wmc 3
c 3
b 2
f 3
lcom 1
cbo 1
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
A getResourceUri() 0 12 2
1
<?php
2
3
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
4
5
namespace Everypay\Action;
6
7
use Everypay\Http\Client\ClientInterface;
8
9
class Delete extends AbstractAction
10
{
11
    protected $method = ClientInterface::METHOD_DELETE;
12
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function __invoke()
17
    {
18
        return $this->createRequest($this->method);
19
    }
20
21
    protected function getResourceUri()
22
    {
23
        $uri = parent::getResourceUri();
24
25
        if (isset($this->params['card'])) {
26
            return $uri
27
                . '/card/'
28
                . $this->params['card'];
29
        }
30
31
        return $uri;
32
    }
33
}
34