Completed
Push — master ( 367642...b5a2de )
by Minas
01:34
created

Balance   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
A getResourceUri() 0 10 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 Balance extends AbstractAction
10
{
11
    protected $method = ClientInterface::METHOD_GET;
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 ($this->resource === 'balance') {
26
            return $uri;
27
        }
28
29
        return $uri . '/balance/';
30
    }
31
}
32