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