Completed
Push — master ( 09654a...6b9952 )
by Tomáš
02:29
created

DeliveryData::setDeliveryCostsEUR()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Inspirum\Balikobot\Model\Values\Package;
4
5
use DateTime;
6
use Inspirum\Balikobot\Definitions\Option;
7
8
trait DeliveryData
9
{
10
    /**
11
     * Set the item at a given offset.
12
     *
13
     * @param string $key
14
     * @param mixed  $value
15
     *
16
     * @return void
17
     */
18
    abstract public function offsetSet($key, $value);
19
20
    /**
21
     * @param string $noteDriver
22
     *
23
     * @return void
24
     */
25 1
    public function setNoteDriver(string $noteDriver): void
26
    {
27 1
        $this->offsetSet(Option::NOTE_DRIVER, $noteDriver);
28 1
    }
29
30
    /**
31
     * @param string $noteCustomer
32
     *
33
     * @return void
34
     */
35 1
    public function setNoteCustomer(string $noteCustomer): void
36
    {
37 1
        $this->offsetSet(Option::NOTE_CUSTOMER, $noteCustomer);
38 1
    }
39
40
    /**
41
     * @param bool $comfortExclusiveService
42
     *
43
     * @return void
44
     */
45 1
    public function setComfortExclusiveService(bool $comfortExclusiveService = true): void
46
    {
47 1
        $this->offsetSet(Option::COMFORT_EXCLUSIVE_SERVICE, (int) $comfortExclusiveService);
48 1
    }
49
50
    /**
51
     * @param bool $persDeliveryFloor
52
     *
53
     * @return void
54
     */
55 1
    public function setPersDeliveryFloor(bool $persDeliveryFloor = true): void
56
    {
57 1
        $this->offsetSet(Option::PERS_DELIVERY_FLOOR, (int) $persDeliveryFloor);
58 1
    }
59
60
    /**
61
     * @param bool $persDeliveryBuilding
62
     *
63
     * @return void
64
     */
65 1
    public function setPersDeliveryBuilding(bool $persDeliveryBuilding = true): void
66
    {
67 1
        $this->offsetSet(Option::PERS_DELIVERY_BUILDING, (int) $persDeliveryBuilding);
68 1
    }
69
70
    /**
71
     * @param bool $persDeliveryDepartment
72
     *
73
     * @return void
74
     */
75 1
    public function setPersDeliveryDepartment(bool $persDeliveryDepartment = true): void
76
    {
77 1
        $this->offsetSet(Option::PERS_DELIVERY_DEPARTMENT, (int) $persDeliveryDepartment);
78 1
    }
79
80
    /**
81
     * @param string $pin
82
     *
83
     * @return void
84
     */
85 1
    public function setPIN(string $pin): void
86
    {
87 1
        $this->offsetSet(Option::PIN, $pin);
88 1
    }
89
90
    /**
91
     * @param bool $satDelivery
92
     *
93
     * @return void
94
     */
95 1
    public function setSatDelivery(bool $satDelivery = true): void
96
    {
97 1
        $this->offsetSet(Option::SAT_DELIVERY, (int) $satDelivery);
98 1
    }
99
100
    /**
101
     * @param bool $requireFullAge
102
     *
103
     * @return void
104
     */
105 1
    public function setRequireFullAge(bool $requireFullAge = true): void
106
    {
107 1
        $this->offsetSet(Option::REQUIRE_FULL_AGE, (int) $requireFullAge);
108 1
    }
109
110
    /**
111
     * @param string $fullAgeData
112
     *
113
     * @return void
114
     */
115 1
    public function setFullAgeData(string $fullAgeData): void
116
    {
117 1
        $this->offsetSet(Option::FULL_AGE_DATA, $fullAgeData);
118 1
    }
119
120
    /**
121
     * @param string $password
122
     *
123
     * @return void
124
     */
125 1
    public function setPassword(string $password): void
126
    {
127 1
        $this->offsetSet(Option::PASSWORD, $password);
128 1
    }
129
130
    /**
131
     * @param bool $delInsurance
132
     *
133
     * @return void
134
     */
135 1
    public function setDelInsurance(bool $delInsurance = true): void
136
    {
137 1
        $this->offsetSet(Option::DEL_INSURANCE, (int) $delInsurance);
138 1
    }
139
140
    /**
141
     * @param bool $delEvening
142
     *
143
     * @return void
144
     */
145 1
    public function setDelEvening(bool $delEvening = true): void
146
    {
147 1
        $this->offsetSet(Option::DEL_EVENING, (int) $delEvening);
148 1
    }
149
150
    /**
151
     * @param bool $delExworks
152
     *
153
     * @return void
154
     */
155 1
    public function setDelExworks(bool $delExworks = true): void
156
    {
157 1
        $this->offsetSet(Option::DEL_EXWORKS, (int) $delExworks);
158 1
    }
159
160
    /**
161
     * @param bool $comfort
162
     *
163
     * @return void
164
     */
165 1
    public function setComfortService(bool $comfort = true): void
166
    {
167 1
        $this->offsetSet(Option::COMFORT_SERVICE, (int) $comfort);
168 1
    }
169
170
    /**
171
     * @param bool $comfort
172
     *
173
     * @return void
174
     */
175 1
    public function setComfortServicePlus(bool $comfort = true): void
176
    {
177 1
        $this->offsetSet(Option::COMFORT_SERVICE_PLUS, (int) $comfort);
178 1
    }
179
180
    /**
181
     * @param \DateTime $deliveryDate
182
     *
183
     * @return void
184
     */
185 1
    public function setDeliveryDate(DateTime $deliveryDate): void
186
    {
187 1
        $this->offsetSet(Option::DELIVERY_DATE, $deliveryDate->format('Y-m-d'));
188 1
    }
189
190
    /**
191
     * @param bool $swap
192
     *
193
     * @return void
194
     */
195 1
    public function setSwap(bool $swap): void
196
    {
197 1
        $this->offsetSet(Option::SWAP, (int) $swap);
198 1
    }
199
200
    /**
201
     * @param string $swapOption
202
     *
203
     * @return void
204
     */
205 1
    public function setSwapOption(string $swapOption): void
206
    {
207 1
        $this->offsetSet(Option::SWAP_OPTION, $swapOption);
208 1
    }
209
210
    /**
211
     * @param bool $openBeforePayment
212
     *
213
     * @return void
214
     */
215 1
    public function setOpenBeforePayment(bool $openBeforePayment = true): void
216
    {
217 1
        $this->offsetSet(Option::OPEN_BEFORE_PAYMENT, (int) $openBeforePayment);
218 1
    }
219
220
    /**
221
     * @param bool $testBeforePayment
222
     *
223
     * @return void
224
     */
225 1
    public function setTestBeforePayment(bool $testBeforePayment = true): void
226
    {
227 1
        $this->offsetSet(Option::TEST_BEFORE_PAYMENT, (int) $testBeforePayment);
228 1
    }
229
230
    /**
231
     * @param string $note
232
     *
233
     * @return void
234
     */
235 1
    public function setNote(string $note): void
236
    {
237 1
        $this->offsetSet(Option::NOTE, $note);
238 1
    }
239
240
    /**
241
     * @param string $recHouseNumber
242
     *
243
     * @return void
244
     */
245 1
    public function setRecHouseNumber(string $recHouseNumber): void
246
    {
247 1
        $this->offsetSet(Option::REC_HOUSE_NUMBER, $recHouseNumber);
248 1
    }
249
250
    /**
251
     * @param string $recBlock
252
     *
253
     * @return void
254
     */
255 1
    public function setRecBlock(string $recBlock): void
256
    {
257 1
        $this->offsetSet(Option::REC_BLOCK, $recBlock);
258 1
    }
259
260
    /**
261
     * @param string $recEnteracne
262
     *
263
     * @return void
264
     */
265 1
    public function setRecEnterance(string $recEnteracne): void
266
    {
267 1
        $this->offsetSet(Option::REC_ENTERANCE, $recEnteracne);
268 1
    }
269
270
    /**
271
     * @param string $recFloor
272
     *
273
     * @return void
274
     */
275 1
    public function setFloor(string $recFloor): void
276
    {
277 1
        $this->offsetSet(Option::REC_FLOOR, $recFloor);
278 1
    }
279
280
    /**
281
     * @param string $recFlatNumber
282
     *
283
     * @return void
284
     */
285 1
    public function setFlatNumber(string $recFlatNumber): void
286
    {
287 1
        $this->offsetSet(Option::REC_FLAT_NUMBER, $recFlatNumber);
288 1
    }
289
290
    /**
291
     * @param float $deliveryCosts
292
     *
293
     * @return void
294
     */
295 1
    public function setDeliveryCosts(float $deliveryCosts): void
296
    {
297 1
        $this->offsetSet(Option::DELIVERY_COSTS, $deliveryCosts);
298 1
    }
299
300
    /**
301
     * @param float $deliveryCosts
302
     *
303
     * @return void
304
     */
305 1
    public function setDeliveryCostsEUR(float $deliveryCosts): void
306
    {
307 1
        $this->offsetSet(Option::DELIVERY_COSTS_EUR, $deliveryCosts);
308 1
    }
309
}
310