GetCurrency   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 58
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getModelClass() 0 4 1
A getHttpMethod() 0 4 1
A getUri() 0 4 1
A getGuzzleOptions() 0 4 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Functions\Currencies;
4
5
use Fousky\Component\iDoklad\Functions\iDokladAbstractFunction;
6
use Fousky\Component\iDoklad\Model\Currencies\CurrencyApiModel;
7
8
/**
9
 * @author Lukáš Brzák <[email protected]>
10
 */
11
class GetCurrency extends iDokladAbstractFunction
12
{
13
    protected $id;
14
15
    public function __construct($id)
16
    {
17
        $this->id = $id;
18
    }
19
20
    /**
21
     * Get iDokladModelInterface class.
22
     *
23
     * @see iDokladModelInterface
24
     *
25
     * @return string
26
     */
27
    public function getModelClass(): string
28
    {
29
        return CurrencyApiModel::class;
30
    }
31
32
    /**
33
     * GET|POST|PUT|DELETE e.g.
34
     *
35
     * @see iDoklad::request()
36
     *
37
     * @return string
38
     */
39
    public function getHttpMethod(): string
40
    {
41
        return 'GET';
42
    }
43
44
    /**
45
     * Return base URI, e.g. /invoices; /invoice/1/edit and so on.
46
     *
47
     * @see iDoklad::call()
48
     *
49
     * @return string
50
     */
51
    public function getUri(): string
52
    {
53
        return sprintf('Currencies/%s', $this->id);
54
    }
55
56
    /**
57
     * Vrátí seznam parametrů, které se předají GuzzleHttp\Client.
58
     *
59
     * @see \GuzzleHttp\Client::request()
60
     * @see iDoklad::call()
61
     *
62
     * @return array
63
     */
64
    public function getGuzzleOptions(): array
65
    {
66
        return [];
67
    }
68
}
69