Skip to content

Commit 049a1ac

Browse files
authored
fix(export): export addresses consistently (#502)
* fix(export): export addresses consistently * fix(export): export addresses consistently
1 parent 192673d commit 049a1ac

File tree

3 files changed

+0
-57
lines changed

3 files changed

+0
-57
lines changed

src/Model/Consignment/AbstractConsignment.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,17 +1168,6 @@ public function setBoxNumber(?string $boxNumber): self
11681168
*/
11691169
public function encodeStreet(array $consignmentEncoded): array
11701170
{
1171-
if ($this->getCountry() === self::CC_NL) {
1172-
return array_merge_recursive($consignmentEncoded, [
1173-
'recipient' => [
1174-
'street' => $this->getStreet(true),
1175-
'street_additional_info' => $this->getStreetAdditionalInfo(),
1176-
'number' => $this->getNumber(),
1177-
'number_suffix' => (string) $this->getNumberSuffix(),
1178-
],
1179-
]);
1180-
}
1181-
11821171
$consignmentEncoded['recipient']['street'] = $this->getFullStreet(true);
11831172
$consignmentEncoded['recipient']['street_additional_info'] = $this->getStreetAdditionalInfo();
11841173

src/Model/Consignment/BpostConsignment.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,30 +44,6 @@ class BpostConsignment extends AbstractConsignment
4444
*/
4545
protected $validatorClass = BpostConsignmentValidator::class;
4646

47-
/**
48-
* @param array $consignmentEncoded
49-
*
50-
* @return array
51-
* @throws \MyParcelNL\Sdk\src\Exception\MissingFieldException
52-
*/
53-
public function encodeStreet(array $consignmentEncoded): array
54-
{
55-
if (self::CC_BE === $this->getCountry()) {
56-
return array_merge_recursive($consignmentEncoded, [
57-
'recipient' => [
58-
'street' => $this->getStreet(true),
59-
'street_additional_info' => $this->getStreetAdditionalInfo(),
60-
'number' => $this->getNumber(),
61-
'box_number' => (string) $this->getBoxNumber(),
62-
'number_suffix' => (string) $this->getNumberSuffix(),
63-
],
64-
]);
65-
}
66-
67-
return parent::encodeStreet($consignmentEncoded);
68-
}
69-
70-
7147
/**
7248
* @return string
7349
*/

src/Model/Consignment/DPDConsignment.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -50,28 +50,6 @@ public function getAllowedPackageTypes(): array
5050
];
5151
}
5252

53-
/**
54-
* @param array $consignmentEncoded
55-
*
56-
* @return array
57-
* @throws \MyParcelNL\Sdk\src\Exception\MissingFieldException
58-
*/
59-
public function encodeStreet(array $consignmentEncoded): array
60-
{
61-
if (self::CC_BE === $this->getCountry()) {
62-
return array_merge_recursive($consignmentEncoded, [
63-
'recipient' => [
64-
'street' => $this->getStreet(true),
65-
'street_additional_info' => $this->getStreetAdditionalInfo(),
66-
'number' => $this->getNumber(),
67-
'box_number' => (string) $this->getBoxNumber(),
68-
],
69-
]);
70-
}
71-
72-
return parent::encodeStreet($consignmentEncoded);
73-
}
74-
7553
/**
7654
* @return string
7755
*/

0 commit comments

Comments
 (0)