File tree 2 files changed +76
-1
lines changed
2 files changed +76
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ final class PacketAttributes implements IModel
52
52
53
53
private ?string $ customerBarcode ;
54
54
55
+ private ?Size $ size ;
56
+
55
57
56
58
public function __construct (
57
59
string $ number ,
@@ -75,7 +77,8 @@ public function __construct(
75
77
?string $ carrierPickupPoint = null ,
76
78
?string $ carrierService = null ,
77
79
?DispatchOrder $ dispatchOrder = null ,
78
- ?string $ customerBarcode = null
80
+ ?string $ customerBarcode = null ,
81
+ ?Size $ size = null
79
82
) {
80
83
$ this ->setNumber ($ number );
81
84
$ this ->setName ($ name );
@@ -99,6 +102,7 @@ public function __construct(
99
102
$ this ->setCarrierService ($ carrierService );
100
103
$ this ->setDispatchOrder ($ dispatchOrder );
101
104
$ this ->setCustomerBarcode ($ customerBarcode );
105
+ $ this ->setSize ($ size );
102
106
}
103
107
104
108
@@ -372,6 +376,16 @@ public function setCustomerBarcode(?string $customerBarcode): void
372
376
$ this ->customerBarcode = $ customerBarcode ;
373
377
}
374
378
379
+ public function getSize () : ?Size
380
+ {
381
+ return $ this ->size ;
382
+ }
383
+
384
+ public function setSize (?Size $ size ) : void
385
+ {
386
+ $ this ->size = $ size ;
387
+ }
388
+
375
389
376
390
/**
377
391
* @return mixed[]
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace Salamek \Zasilkovna \Model ;
6
+
7
+ final class Size implements IModel
8
+ {
9
+ private int $ length ;
10
+ private int $ width ;
11
+ private int $ height ;
12
+
13
+ public function __construct (
14
+ int $ length ,
15
+ int $ width ,
16
+ int $ height
17
+ ) {
18
+ $ this ->setLength ($ length );
19
+ $ this ->setWidth ($ width );
20
+ $ this ->setHeight ($ height );
21
+ }
22
+
23
+ public function getLength () : int
24
+ {
25
+ return $ this ->length ;
26
+ }
27
+
28
+ public function setLength (int $ length ) : void
29
+ {
30
+ $ this ->length = $ length ;
31
+ }
32
+
33
+ public function getWidth () : int
34
+ {
35
+ return $ this ->width ;
36
+ }
37
+
38
+ public function setWidth (int $ width ) : void
39
+ {
40
+ $ this ->width = $ width ;
41
+ }
42
+
43
+ public function getHeight () : int
44
+ {
45
+ return $ this ->height ;
46
+ }
47
+
48
+ public function setHeight (int $ height ) : void
49
+ {
50
+ $ this ->height = $ height ;
51
+ }
52
+
53
+
54
+ /**
55
+ * @return mixed[]
56
+ */
57
+ public function toArray (): array
58
+ {
59
+ return get_object_vars ($ this );
60
+ }
61
+ }
You can’t perform that action at this time.
0 commit comments