GetDefaultIssuedDocumentPayment::getUri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Fousky\Component\iDoklad\Functions\IssuedDocumentPayments;
4
5
use Fousky\Component\iDoklad\Functions\iDokladAbstractFunction;
6
use Fousky\Component\iDoklad\Model\IssuedDocumentPayments\IssuedDocumentPaymentApiModelInsert;
7
8
/**
9
 * @author Lukáš Brzák <[email protected]>
10
 */
11 View Code Duplication
class GetDefaultIssuedDocumentPayment extends iDokladAbstractFunction
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /** @var string $documentId */
14
    protected $documentId;
15
16
    /**
17
     * @param string $documentId
18
     */
19
    public function __construct(string $documentId)
20
    {
21
        $this->documentId = $documentId;
22
    }
23
24
    /**
25
     * Get iDokladModelInterface class.
26
     *
27
     * @see iDokladModelInterface
28
     *
29
     * @return string
30
     */
31
    public function getModelClass(): string
32
    {
33
        return IssuedDocumentPaymentApiModelInsert::class;
34
    }
35
36
    /**
37
     * GET|POST|PUT|DELETE e.g.
38
     *
39
     * @see iDoklad::request()
40
     *
41
     * @return string
42
     */
43
    public function getHttpMethod(): string
44
    {
45
        return 'GET';
46
    }
47
48
    /**
49
     * Return base URI, e.g. /invoices; /invoice/1/edit and so on.
50
     *
51
     * @see iDoklad::call()
52
     *
53
     * @return string
54
     */
55
    public function getUri(): string
56
    {
57
        return sprintf('IssuedDocumentPayments/Default/%s', $this->documentId);
58
    }
59
60
    /**
61
     * Vrátí seznam parametrů, které se předají GuzzleHttp\Client.
62
     *
63
     * @see \GuzzleHttp\Client::request()
64
     * @see iDoklad::call()
65
     *
66
     * @return array
67
     */
68
    public function getGuzzleOptions(): array
69
    {
70
        return [];
71
    }
72
}
73