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

Balance::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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