Test Failed
Branch master (62528d)
by Zangra
14:14 queued 12:04
created
src/Bpost/Order/Box/Option/Messaging.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -169,13 +169,13 @@
 block discarded – undo
169 169
      */
170 170
     public static function createFromXML(SimpleXMLElement $xml): static
171 171
     {
172
-        $messaging = new static($xml->getName(), (string)$xml->attributes()->language);
172
+        $messaging = new static($xml->getName(), (string) $xml->attributes()->language);
173 173
 
174
-        if ((string)$xml->emailAddress !== '') {
175
-            $messaging->setEmailAddress((string)$xml->emailAddress);
174
+        if ((string) $xml->emailAddress !== '') {
175
+            $messaging->setEmailAddress((string) $xml->emailAddress);
176 176
         }
177
-        if ((string)$xml->mobilePhone !== '') {
178
-            $messaging->setMobilePhone((string)$xml->mobilePhone);
177
+        if ((string) $xml->mobilePhone !== '') {
178
+            $messaging->setMobilePhone((string) $xml->mobilePhone);
179 179
         }
180 180
 
181 181
         return $messaging;
Please login to merge, or discard this patch.
src/Bpost/Order/Box/International.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
             $international->appendChild(
175 175
                 $document->createElement(
176 176
                     XmlHelper::getPrefixedTagName('parcelWeight', $innerPrefix),
177
-                    (string)$this->parcelWeight
177
+                    (string) $this->parcelWeight
178 178
                 )
179 179
             );
180 180
         }
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
     {
204 204
         $international = new self();
205 205
 
206
-        if (isset($xml->international->product) && (string)$xml->international->product !== '') {
207
-            $international->setProduct((string)$xml->international->product);
206
+        if (isset($xml->international->product) && (string) $xml->international->product !== '') {
207
+            $international->setProduct((string) $xml->international->product);
208 208
         }
209 209
 
210 210
         if (isset($xml->international->options)) {
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                         $option = Messaging::createFromXML($optionData);
219 219
                         break;
220 220
                     default:
221
-                        $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName());
221
+                        $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName());
222 222
                         XmlHelper::assertMethodCreateFromXmlExists($className);
223 223
                         $option = $className::createFromXML($optionData);
224 224
                 }
@@ -226,8 +226,8 @@  discard block
 block discarded – undo
226 226
             }
227 227
         }
228 228
 
229
-        if (isset($xml->international->parcelWeight) && (string)$xml->international->parcelWeight !== '') {
230
-            $international->setParcelWeight((int)$xml->international->parcelWeight);
229
+        if (isset($xml->international->parcelWeight) && (string) $xml->international->parcelWeight !== '') {
230
+            $international->setParcelWeight((int) $xml->international->parcelWeight);
231 231
         }
232 232
 
233 233
         if (isset($xml->international->receiver)) {
Please login to merge, or discard this patch.
src/Bpost/Order/Box/National.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function toXML(DOMDocument $document, ?string $prefix = null, ?string $type = null): DOMElement
116 116
     {
117
-        $typeElement = $document->createElement((string)$type);
117
+        $typeElement = $document->createElement((string) $type);
118 118
 
119 119
         if ($this->product !== null) {
120 120
             $typeElement->appendChild(
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
         if ($this->weight !== null) {
134 134
             $typeElement->appendChild(
135
-                $document->createElement(XmlHelper::getPrefixedTagName('weight', $prefix), (string)$this->weight)
135
+                $document->createElement(XmlHelper::getPrefixedTagName('weight', $prefix), (string) $this->weight)
136 136
             );
137 137
         }
138 138
 
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
             throw new BpostException('Set an instance of National');
169 169
         }
170 170
 
171
-        if (isset($nationalXml->product) && (string)$nationalXml->product !== '') {
172
-            $self->setProduct((string)$nationalXml->product);
171
+        if (isset($nationalXml->product) && (string) $nationalXml->product !== '') {
172
+            $self->setProduct((string) $nationalXml->product);
173 173
         }
174 174
 
175 175
         if (isset($nationalXml->options) && !empty($nationalXml->options)) {
@@ -195,18 +195,18 @@  discard block
 block discarded – undo
195 195
             }
196 196
         }
197 197
 
198
-        if (isset($nationalXml->weight) && (string)$nationalXml->weight !== '') {
199
-            $self->setWeight((int)$nationalXml->weight);
198
+        if (isset($nationalXml->weight) && (string) $nationalXml->weight !== '') {
199
+            $self->setWeight((int) $nationalXml->weight);
200 200
         }
201 201
 
202
-        if (isset($nationalXml->openingHours) && (string)$nationalXml->openingHours !== '') {
202
+        if (isset($nationalXml->openingHours) && (string) $nationalXml->openingHours !== '') {
203 203
             foreach ($nationalXml->openingHours->children() as $day => $value) {
204
-                $self->addOpeningHour(new Day((string)$day, (string)$value));
204
+                $self->addOpeningHour(new Day((string) $day, (string) $value));
205 205
             }
206 206
         }
207 207
 
208
-        if (isset($nationalXml->desiredDeliveryPlace) && (string)$nationalXml->desiredDeliveryPlace !== '') {
209
-            $self->setDesiredDeliveryPlace((string)$nationalXml->desiredDeliveryPlace);
208
+        if (isset($nationalXml->desiredDeliveryPlace) && (string) $nationalXml->desiredDeliveryPlace !== '') {
209
+            $self->setDesiredDeliveryPlace((string) $nationalXml->desiredDeliveryPlace);
210 210
         }
211 211
 
212 212
         return $self;
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     protected static function getOptionFromOptionData(SimpleXMLElement $optionData): Option
219 219
     {
220
-        $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\' . ucfirst($optionData->getName());
220
+        $className = '\\Bpost\\BpostApiClient\\Bpost\\Order\\Box\\Option\\'.ucfirst($optionData->getName());
221 221
         XmlHelper::assertMethodCreateFromXmlExists($className);
222 222
 
223 223
         /** @var callable $factory */
Please login to merge, or discard this patch.
src/Bpost/Order/Box/National/Unregistered.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -106,16 +106,16 @@
 block discarded – undo
106 106
     {
107 107
         $self = new self();
108 108
 
109
-        if (isset($xml->language) && (string)$xml->language !== '') {
110
-            $self->setLanguage((string)$xml->language);
109
+        if (isset($xml->language) && (string) $xml->language !== '') {
110
+            $self->setLanguage((string) $xml->language);
111 111
         }
112 112
 
113
-        if (isset($xml->mobilePhone) && (string)$xml->mobilePhone !== '') {
114
-            $self->setMobilePhone((string)$xml->mobilePhone);
113
+        if (isset($xml->mobilePhone) && (string) $xml->mobilePhone !== '') {
114
+            $self->setMobilePhone((string) $xml->mobilePhone);
115 115
         }
116 116
 
117
-        if (isset($xml->emailAddress) && (string)$xml->emailAddress !== '') {
118
-            $self->setEmailAddress((string)$xml->emailAddress);
117
+        if (isset($xml->emailAddress) && (string) $xml->emailAddress !== '') {
118
+            $self->setEmailAddress((string) $xml->emailAddress);
119 119
         }
120 120
 
121 121
         if (isset($xml->parcelLockerReducedMobilityZone)) {
Please login to merge, or discard this patch.
src/Bpost/Order/Box/AtBpost.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
     {
187 187
         $atBpost = new AtBpost();
188 188
 
189
-        if (isset($xml->atBpost->product) && (string)$xml->atBpost->product !== '') {
190
-            $atBpost->setProduct((string)$xml->atBpost->product);
189
+        if (isset($xml->atBpost->product) && (string) $xml->atBpost->product !== '') {
190
+            $atBpost->setProduct((string) $xml->atBpost->product);
191 191
         }
192 192
 
193 193
         if (isset($xml->atBpost->options)) {
@@ -213,31 +213,31 @@  discard block
 block discarded – undo
213 213
             }
214 214
         }
215 215
 
216
-        if (isset($xml->atBpost->weight) && (string)$xml->atBpost->weight !== '') {
217
-            $atBpost->setWeight((int)$xml->atBpost->weight);
216
+        if (isset($xml->atBpost->weight) && (string) $xml->atBpost->weight !== '') {
217
+            $atBpost->setWeight((int) $xml->atBpost->weight);
218 218
         }
219
-        if (isset($xml->atBpost->receiverName) && (string)$xml->atBpost->receiverName !== '') {
220
-            $atBpost->setReceiverName((string)$xml->atBpost->receiverName);
219
+        if (isset($xml->atBpost->receiverName) && (string) $xml->atBpost->receiverName !== '') {
220
+            $atBpost->setReceiverName((string) $xml->atBpost->receiverName);
221 221
         }
222
-        if (isset($xml->atBpost->receiverCompany) && (string)$xml->atBpost->receiverCompany !== '') {
223
-            $atBpost->setReceiverCompany((string)$xml->atBpost->receiverCompany);
222
+        if (isset($xml->atBpost->receiverCompany) && (string) $xml->atBpost->receiverCompany !== '') {
223
+            $atBpost->setReceiverCompany((string) $xml->atBpost->receiverCompany);
224 224
         }
225
-        if (isset($xml->atBpost->pugoId) && (string)$xml->atBpost->pugoId !== '') {
226
-            $atBpost->setPugoId((string)$xml->atBpost->pugoId);
225
+        if (isset($xml->atBpost->pugoId) && (string) $xml->atBpost->pugoId !== '') {
226
+            $atBpost->setPugoId((string) $xml->atBpost->pugoId);
227 227
         }
228
-        if (isset($xml->atBpost->pugoName) && (string)$xml->atBpost->pugoName !== '') {
229
-            $atBpost->setPugoName((string)$xml->atBpost->pugoName);
228
+        if (isset($xml->atBpost->pugoName) && (string) $xml->atBpost->pugoName !== '') {
229
+            $atBpost->setPugoName((string) $xml->atBpost->pugoName);
230 230
         }
231 231
         if (isset($xml->atBpost->pugoAddress)) {
232 232
             $pugoAddressData = $xml->atBpost->pugoAddress
233 233
                 ->children('http://schema.post.be/shm/deepintegration/v3/common');
234 234
             $atBpost->setPugoAddress(PugoAddress::createFromXML($pugoAddressData));
235 235
         }
236
-        if (isset($xml->atBpost->requestedDeliveryDate) && (string)$xml->atBpost->requestedDeliveryDate !== '') {
237
-            $atBpost->setRequestedDeliveryDate((string)$xml->atBpost->requestedDeliveryDate);
236
+        if (isset($xml->atBpost->requestedDeliveryDate) && (string) $xml->atBpost->requestedDeliveryDate !== '') {
237
+            $atBpost->setRequestedDeliveryDate((string) $xml->atBpost->requestedDeliveryDate);
238 238
         }
239
-        if (isset($xml->atBpost->shopHandlingInstruction) && (string)$xml->atBpost->shopHandlingInstruction !== '') {
240
-            $atBpost->setShopHandlingInstruction((string)$xml->atBpost->shopHandlingInstruction);
239
+        if (isset($xml->atBpost->shopHandlingInstruction) && (string) $xml->atBpost->shopHandlingInstruction !== '') {
240
+            $atBpost->setShopHandlingInstruction((string) $xml->atBpost->shopHandlingInstruction);
241 241
         }
242 242
 
243 243
         return $atBpost;
Please login to merge, or discard this patch.
src/Bpost/Order/Box/CustomsInfo/CustomsInfo.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -244,26 +244,26 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $customsInfo = new self();
246 246
 
247
-        if (isset($xml->parcelValue) && (string)$xml->parcelValue !== '') {
248
-            $customsInfo->setParcelValue((int)$xml->parcelValue);
247
+        if (isset($xml->parcelValue) && (string) $xml->parcelValue !== '') {
248
+            $customsInfo->setParcelValue((int) $xml->parcelValue);
249 249
         }
250
-        if (isset($xml->contentDescription) && (string)$xml->contentDescription !== '') {
251
-            $customsInfo->setContentDescription((string)$xml->contentDescription);
250
+        if (isset($xml->contentDescription) && (string) $xml->contentDescription !== '') {
251
+            $customsInfo->setContentDescription((string) $xml->contentDescription);
252 252
         }
253
-        if (isset($xml->shipmentType) && (string)$xml->shipmentType !== '') {
254
-            $customsInfo->setShipmentType((string)$xml->shipmentType);
253
+        if (isset($xml->shipmentType) && (string) $xml->shipmentType !== '') {
254
+            $customsInfo->setShipmentType((string) $xml->shipmentType);
255 255
         }
256
-        if (isset($xml->parcelReturnInstructions) && (string)$xml->parcelReturnInstructions !== '') {
257
-            $customsInfo->setParcelReturnInstructions((string)$xml->parcelReturnInstructions);
256
+        if (isset($xml->parcelReturnInstructions) && (string) $xml->parcelReturnInstructions !== '') {
257
+            $customsInfo->setParcelReturnInstructions((string) $xml->parcelReturnInstructions);
258 258
         }
259
-        if (isset($xml->privateAddress) && (string)$xml->privateAddress !== '') {
260
-            $customsInfo->setPrivateAddress(in_array((string)$xml->privateAddress, ['true', '1'], true));
259
+        if (isset($xml->privateAddress) && (string) $xml->privateAddress !== '') {
260
+            $customsInfo->setPrivateAddress(in_array((string) $xml->privateAddress, ['true', '1'], true));
261 261
         }
262
-        if (isset($xml->currency) && (string)$xml->currency !== '') {
263
-            $customsInfo->setCurrency((string)$xml->currency);
262
+        if (isset($xml->currency) && (string) $xml->currency !== '') {
263
+            $customsInfo->setCurrency((string) $xml->currency);
264 264
         }
265
-        if (isset($xml->amtPostagePaidByAddresse) && (string)$xml->amtPostagePaidByAddresse !== '') {
266
-            $customsInfo->setAmtPostagePaidByAddresse((float)$xml->amtPostagePaidByAddresse);
265
+        if (isset($xml->amtPostagePaidByAddresse) && (string) $xml->amtPostagePaidByAddresse !== '') {
266
+            $customsInfo->setAmtPostagePaidByAddresse((float) $xml->amtPostagePaidByAddresse);
267 267
         }
268 268
 
269 269
         return $customsInfo;
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
             $customsInfo->appendChild(
277 277
                 $document->createElement(
278 278
                     XmlHelper::getPrefixedTagName('parcelValue', $prefix),
279
-                    (string)$this->getParcelValue()
279
+                    (string) $this->getParcelValue()
280 280
                 )
281 281
             );
282 282
         }
Please login to merge, or discard this patch.
src/Bpost/Order/Box/BpostOnAppointment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,8 +90,8 @@
 block discarded – undo
90 90
             );
91 91
         }
92 92
 
93
-        if (isset($bpostOnAppointmentXml->inNetworkCutOff) && (string)$bpostOnAppointmentXml->inNetworkCutOff !== '') {
94
-            $self->setInNetworkCutOff((string)$bpostOnAppointmentXml->inNetworkCutOff);
93
+        if (isset($bpostOnAppointmentXml->inNetworkCutOff) && (string) $bpostOnAppointmentXml->inNetworkCutOff !== '') {
94
+            $self->setInNetworkCutOff((string) $bpostOnAppointmentXml->inNetworkCutOff);
95 95
         }
96 96
 
97 97
         return $self;
Please login to merge, or discard this patch.
src/Bpost/Order/Box/At247.php 2 patches
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         }
159 159
         if ($this->memberId !== null) {
160 160
             $boxElement->appendChild($document->createElement('memberId', $this->memberId));
161
-        }else if ($this->unregistered !== null) {
161
+        } else if ($this->unregistered !== null) {
162 162
             $boxElement->appendChild($this->unregistered->toXML($document));
163 163
         }
164 164
 
@@ -193,8 +193,8 @@  discard block
 block discarded – undo
193 193
     {
194 194
         $at247 = new At247();
195 195
 
196
-        if (isset($xml->{'at24-7'}->product) && (string)$xml->{'at24-7'}->product !== '') {
197
-            $at247->setProduct((string)$xml->{'at24-7'}->product);
196
+        if (isset($xml->{'at24-7'}->product) && (string) $xml->{'at24-7'}->product !== '') {
197
+            $at247->setProduct((string) $xml->{'at24-7'}->product);
198 198
         }
199 199
 
200 200
         if (isset($xml->{'at24-7'}->options)) {
@@ -211,31 +211,31 @@  discard block
 block discarded – undo
211 211
             }
212 212
         }
213 213
 
214
-        if (isset($xml->{'at24-7'}->weight) && (string)$xml->{'at24-7'}->weight !== '') {
215
-            $at247->setWeight((int)$xml->{'at24-7'}->weight);
214
+        if (isset($xml->{'at24-7'}->weight) && (string) $xml->{'at24-7'}->weight !== '') {
215
+            $at247->setWeight((int) $xml->{'at24-7'}->weight);
216 216
         }
217
-        if (isset($xml->{'at24-7'}->memberId) && (string)$xml->{'at24-7'}->memberId !== '') {
218
-            $at247->setMemberId((string)$xml->{'at24-7'}->memberId);
217
+        if (isset($xml->{'at24-7'}->memberId) && (string) $xml->{'at24-7'}->memberId !== '') {
218
+            $at247->setMemberId((string) $xml->{'at24-7'}->memberId);
219 219
         }
220
-        if (isset($xml->{'at24-7'}->receiverName) && (string)$xml->{'at24-7'}->receiverName !== '') {
221
-            $at247->setReceiverName((string)$xml->{'at24-7'}->receiverName);
220
+        if (isset($xml->{'at24-7'}->receiverName) && (string) $xml->{'at24-7'}->receiverName !== '') {
221
+            $at247->setReceiverName((string) $xml->{'at24-7'}->receiverName);
222 222
         }
223
-        if (isset($xml->{'at24-7'}->receiverCompany) && (string)$xml->{'at24-7'}->receiverCompany !== '') {
224
-            $at247->setReceiverCompany((string)$xml->{'at24-7'}->receiverCompany);
223
+        if (isset($xml->{'at24-7'}->receiverCompany) && (string) $xml->{'at24-7'}->receiverCompany !== '') {
224
+            $at247->setReceiverCompany((string) $xml->{'at24-7'}->receiverCompany);
225 225
         }
226
-        if (isset($xml->{'at24-7'}->parcelsDepotId) && (string)$xml->{'at24-7'}->parcelsDepotId !== '') {
227
-            $at247->setParcelsDepotId((string)$xml->{'at24-7'}->parcelsDepotId);
226
+        if (isset($xml->{'at24-7'}->parcelsDepotId) && (string) $xml->{'at24-7'}->parcelsDepotId !== '') {
227
+            $at247->setParcelsDepotId((string) $xml->{'at24-7'}->parcelsDepotId);
228 228
         }
229
-        if (isset($xml->{'at24-7'}->parcelsDepotName) && (string)$xml->{'at24-7'}->parcelsDepotName !== '') {
230
-            $at247->setParcelsDepotName((string)$xml->{'at24-7'}->parcelsDepotName);
229
+        if (isset($xml->{'at24-7'}->parcelsDepotName) && (string) $xml->{'at24-7'}->parcelsDepotName !== '') {
230
+            $at247->setParcelsDepotName((string) $xml->{'at24-7'}->parcelsDepotName);
231 231
         }
232 232
         if (isset($xml->{'at24-7'}->parcelsDepotAddress)) {
233 233
             $parcelsDepotAddressData = $xml->{'at24-7'}->parcelsDepotAddress
234 234
                 ->children('http://schema.post.be/shm/deepintegration/v3/common');
235 235
             $at247->setParcelsDepotAddress(ParcelsDepotAddress::createFromXML($parcelsDepotAddressData));
236 236
         }
237
-        if (isset($xml->{'at24-7'}->requestedDeliveryDate) && (string)$xml->{'at24-7'}->requestedDeliveryDate !== '') {
238
-            $at247->setRequestedDeliveryDate((string)$xml->{'at24-7'}->requestedDeliveryDate);
237
+        if (isset($xml->{'at24-7'}->requestedDeliveryDate) && (string) $xml->{'at24-7'}->requestedDeliveryDate !== '') {
238
+            $at247->setRequestedDeliveryDate((string) $xml->{'at24-7'}->requestedDeliveryDate);
239 239
         }
240 240
 
241 241
         return $at247;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@
 block discarded – undo
158 158
         }
159 159
         if ($this->memberId !== null) {
160 160
             $boxElement->appendChild($document->createElement('memberId', $this->memberId));
161
-        }else if ($this->unregistered !== null) {
161
+        } else if ($this->unregistered !== null) {
162 162
             $boxElement->appendChild($this->unregistered->toXML($document));
163 163
         }
164 164
 
Please login to merge, or discard this patch.
src/Bpost/Order/Address.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@
 block discarded – undo
36 36
         ?string $locality = null,
37 37
         ?string $countryCode = null
38 38
     ) {
39
-        if ($streetName   !== null) $this->setStreetName($streetName);
40
-        if ($number       !== null) $this->setNumber($number);
41
-        if ($box          !== null) $this->setBox($box);
42
-        if ($postalCode   !== null) $this->setPostalCode($postalCode);
43
-        if ($locality     !== null) $this->setLocality($locality);
44
-        if ($countryCode  !== null) $this->setCountryCode($countryCode);
39
+        if ($streetName !== null) $this->setStreetName($streetName);
40
+        if ($number !== null) $this->setNumber($number);
41
+        if ($box !== null) $this->setBox($box);
42
+        if ($postalCode !== null) $this->setPostalCode($postalCode);
43
+        if ($locality !== null) $this->setLocality($locality);
44
+        if ($countryCode !== null) $this->setCountryCode($countryCode);
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,12 +36,24 @@
 block discarded – undo
36 36
         ?string $locality = null,
37 37
         ?string $countryCode = null
38 38
     ) {
39
-        if ($streetName   !== null) $this->setStreetName($streetName);
40
-        if ($number       !== null) $this->setNumber($number);
41
-        if ($box          !== null) $this->setBox($box);
42
-        if ($postalCode   !== null) $this->setPostalCode($postalCode);
43
-        if ($locality     !== null) $this->setLocality($locality);
44
-        if ($countryCode  !== null) $this->setCountryCode($countryCode);
39
+        if ($streetName   !== null) {
40
+            $this->setStreetName($streetName);
41
+        }
42
+        if ($number       !== null) {
43
+            $this->setNumber($number);
44
+        }
45
+        if ($box          !== null) {
46
+            $this->setBox($box);
47
+        }
48
+        if ($postalCode   !== null) {
49
+            $this->setPostalCode($postalCode);
50
+        }
51
+        if ($locality     !== null) {
52
+            $this->setLocality($locality);
53
+        }
54
+        if ($countryCode  !== null) {
55
+            $this->setCountryCode($countryCode);
56
+        }
45 57
     }
46 58
 
47 59
     /**
Please login to merge, or discard this patch.