1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Service\Calculation; |
6
|
|
|
|
7
|
|
|
use JMS\Serializer\Annotation as Serializer; |
8
|
|
|
use VasilDakov\Speedy\Speedy; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Class CalculationRequest |
12
|
|
|
* |
13
|
|
|
* @Serializer\AccessType("public_method") |
14
|
|
|
* @author Vasil Dakov <[email protected]> |
15
|
|
|
* @copyright 2009-2022 Neutrino.bg |
16
|
|
|
* @version 1.0 |
17
|
|
|
*/ |
18
|
|
|
class CalculationRequest |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @var CalculationSender |
22
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Service\Calculation\CalculationSender") |
23
|
|
|
*/ |
24
|
|
|
private CalculationSender $sender; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var CalculationRecipient |
28
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Service\Calculation\CalculationRecipient") |
29
|
|
|
*/ |
30
|
|
|
private CalculationRecipient $recipient; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var CalculationService |
34
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Service\Calculation\CalculationService") |
35
|
|
|
*/ |
36
|
|
|
private CalculationService $service; |
37
|
|
|
|
38
|
|
|
/** |
39
|
|
|
* @var CalculationContent |
40
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Service\Calculation\CalculationContent") |
41
|
|
|
*/ |
42
|
|
|
private CalculationContent $content; |
|
|
|
|
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var CalculationPayment |
46
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Service\Calculation\CalculationPayment") |
47
|
|
|
*/ |
48
|
|
|
private CalculationPayment $payment; |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return CalculationSender |
52
|
|
|
*/ |
53
|
|
|
public function getSender(): CalculationSender |
54
|
|
|
{ |
55
|
|
|
return $this->sender; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param CalculationSender $sender |
60
|
|
|
*/ |
61
|
|
|
public function setSender(CalculationSender $sender): void |
62
|
|
|
{ |
63
|
|
|
$this->sender = $sender; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return CalculationRecipient |
68
|
|
|
*/ |
69
|
|
|
public function getRecipient(): CalculationRecipient |
70
|
|
|
{ |
71
|
|
|
return $this->recipient; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param CalculationRecipient $recipient |
76
|
|
|
*/ |
77
|
|
|
public function setRecipient(CalculationRecipient $recipient): void |
78
|
|
|
{ |
79
|
|
|
$this->recipient = $recipient; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return CalculationService |
84
|
|
|
*/ |
85
|
|
|
public function getService(): CalculationService |
86
|
|
|
{ |
87
|
|
|
return $this->service; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @param CalculationService $service |
92
|
|
|
*/ |
93
|
|
|
public function setService(CalculationService $service): void |
94
|
|
|
{ |
95
|
|
|
$this->service = $service; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return CalculationContent |
100
|
|
|
*/ |
101
|
|
|
public function getContent(): CalculationContent |
102
|
|
|
{ |
103
|
|
|
return $this->content; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @param CalculationContent $content |
108
|
|
|
*/ |
109
|
|
|
public function setContent(CalculationContent $content): void |
110
|
|
|
{ |
111
|
|
|
$this->content = $content; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return CalculationPayment |
116
|
|
|
*/ |
117
|
|
|
public function getPayment(): CalculationPayment |
118
|
|
|
{ |
119
|
|
|
return $this->payment; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param CalculationPayment $payment |
124
|
|
|
*/ |
125
|
|
|
public function setPayment(CalculationPayment $payment): void |
126
|
|
|
{ |
127
|
|
|
$this->payment = $payment; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
|
131
|
|
|
public function toArray(): array |
132
|
|
|
{ |
133
|
|
|
return [ |
134
|
|
|
Speedy::SENDER => $this->sender->toArray(), |
135
|
|
|
Speedy::RECIPIENT => $this->recipient->toArray(), |
136
|
|
|
Speedy::SERVICE => $this->service->toArray(), |
137
|
|
|
Speedy::CONTENT => $this->content->toArray(), |
138
|
|
|
Speedy::PAYMENT => $this->payment->toArray() |
139
|
|
|
]; |
140
|
|
|
} |
141
|
|
|
} |
142
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths