Completed
Push — master ( 4c4b08...572d49 )
by Lukáš
02:13
created

GetCodeBooksChanges::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
dl 4
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Fousky\Component\iDoklad\Functions\System;
4
5
use Fousky\Component\iDoklad\Functions\iDokladAbstractFunction;
6
use Fousky\Component\iDoklad\Model\System\CodeBooksChangesApiModel;
7
8
/**
9
 * @see https://app.idoklad.cz/developer/Help/v2/cs/Api?apiId=GET-api-v2-System-GetCodeBooksChanges_lastCheck
10
 *
11
 * @author Lukáš Brzák <[email protected]>
12
 */
13 View Code Duplication
class GetCodeBooksChanges 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...
14
{
15
    /** @var \DateTime $lastCheckedAt */
16
    protected $lastCheckedAt;
17
18
    /**
19
     * @param \DateTime $lastCheckedAt
20
     */
21
    public function __construct(\DateTime $lastCheckedAt)
22
    {
23
        $this->lastCheckedAt = $lastCheckedAt;
24
    }
25
26
    /**
27
     * Get iDokladModelInterface class.
28
     *
29
     * @see iDokladModelInterface
30
     *
31
     * @return string
32
     */
33
    public function getModelClass(): string
34
    {
35
        return CodeBooksChangesApiModel::class;
36
    }
37
38
    /**
39
     * GET|POST|PUT|DELETE e.g.
40
     *
41
     * @see iDoklad::request()
42
     *
43
     * @return string
44
     */
45
    public function getHttpMethod(): string
46
    {
47
        return 'GET';
48
    }
49
50
    /**
51
     * Return base URI, e.g. /invoices; /invoice/1/edit and so on.
52
     *
53
     * @see iDoklad::call()
54
     *
55
     * @return string
56
     */
57
    public function getUri(): string
58
    {
59
        return sprintf(
60
            'System/GetCodeBooksChanges?lastCheck=%s',
61
            $this->lastCheckedAt->format('Y-m-d H:i:s')
62
        );
63
    }
64
65
    /**
66
     * Vrátí seznam parametrů, které se předají GuzzleHttp\Client.
67
     *
68
     * @see \GuzzleHttp\Client::request()
69
     * @see iDoklad::call()
70
     *
71
     * @return array
72
     */
73
    public function getGuzzleOptions(): array
74
    {
75
        return [];
76
    }
77
}
78