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

Balance::getResourceUri()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
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