File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,6 @@ class OrderFactory
3131 'AddressUpdatedAt ' ,
3232 'AddressBilling ' ,
3333 'AddressShipping ' ,
34- 'NationalRegistrationNumber ' ,
3534 'PromisedShippingTime ' ,
3635 'ItemsCount ' ,
3736 'ExtraAttributes ' ,
@@ -60,6 +59,8 @@ public static function make(SimpleXMLElement $element): Order
6059 $ dateTime = DateTimeImmutable::createFromFormat ('Y-m-d H:i:s ' , (string ) $ element ->PromisedShippingTime );
6160 $ promisedShippingTime = !empty ($ dateTime ) ? $ dateTime : null ;
6261
62+ $ nationalRegistrationNumber = !empty ($ element ->NationalRegistrationNumber ) ? (string ) $ element ->NationalRegistrationNumber : null ;
63+
6364 $ statuses = [];
6465 foreach ($ element ->Statuses ->Status as $ status ) {
6566 array_push ($ statuses , (string ) $ status );
@@ -89,7 +90,7 @@ public static function make(SimpleXMLElement $element): Order
8990 $ addressUpdatedAt ,
9091 $ addressBilling ,
9192 $ addressShipping ,
92- ( string ) $ element -> NationalRegistrationNumber ,
93+ $ nationalRegistrationNumber ,
9394 (int ) $ element ->ItemsCount ,
9495 $ promisedShippingTime ,
9596 (string ) $ element ->ExtraAttributes ,
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ public static function fromData(
146146 ?DateTimeInterface $ addressUpdatedAt ,
147147 Address $ addressBilling ,
148148 Address $ addressShipping ,
149- string $ nationalRegistrationNumber ,
149+ ? string $ nationalRegistrationNumber ,
150150 int $ itemsCount ,
151151 ?DateTimeInterface $ promisedShippingTime ,
152152 ?string $ extraAttributes ,
Original file line number Diff line number Diff line change @@ -265,7 +265,6 @@ public function invalidXmlStructure(): array
265265 ['AddressUpdatedAt ' ],
266266 ['AddressBilling ' ],
267267 ['AddressShipping ' ],
268- ['NationalRegistrationNumber ' ],
269268 ['ItemsCount ' ],
270269 ['PromisedShippingTime ' ],
271270 ['ExtraAttributes ' ],
You can’t perform that action at this time.
0 commit comments