Skip to content

Commit

Permalink
fix(export): export addresses consistently (#502)
Browse files Browse the repository at this point in the history
* fix(export): export addresses consistently

* fix(export): export addresses consistently
  • Loading branch information
joerivanveen authored Sep 24, 2024
1 parent 192673d commit 049a1ac
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 57 deletions.
11 changes: 0 additions & 11 deletions src/Model/Consignment/AbstractConsignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -1168,17 +1168,6 @@ public function setBoxNumber(?string $boxNumber): self
*/
public function encodeStreet(array $consignmentEncoded): array
{
if ($this->getCountry() === self::CC_NL) {
return array_merge_recursive($consignmentEncoded, [
'recipient' => [
'street' => $this->getStreet(true),
'street_additional_info' => $this->getStreetAdditionalInfo(),
'number' => $this->getNumber(),
'number_suffix' => (string) $this->getNumberSuffix(),
],
]);
}

$consignmentEncoded['recipient']['street'] = $this->getFullStreet(true);
$consignmentEncoded['recipient']['street_additional_info'] = $this->getStreetAdditionalInfo();

Expand Down
24 changes: 0 additions & 24 deletions src/Model/Consignment/BpostConsignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,6 @@ class BpostConsignment extends AbstractConsignment
*/
protected $validatorClass = BpostConsignmentValidator::class;

/**
* @param array $consignmentEncoded
*
* @return array
* @throws \MyParcelNL\Sdk\src\Exception\MissingFieldException
*/
public function encodeStreet(array $consignmentEncoded): array
{
if (self::CC_BE === $this->getCountry()) {
return array_merge_recursive($consignmentEncoded, [
'recipient' => [
'street' => $this->getStreet(true),
'street_additional_info' => $this->getStreetAdditionalInfo(),
'number' => $this->getNumber(),
'box_number' => (string) $this->getBoxNumber(),
'number_suffix' => (string) $this->getNumberSuffix(),
],
]);
}

return parent::encodeStreet($consignmentEncoded);
}


/**
* @return string
*/
Expand Down
22 changes: 0 additions & 22 deletions src/Model/Consignment/DPDConsignment.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,6 @@ public function getAllowedPackageTypes(): array
];
}

/**
* @param array $consignmentEncoded
*
* @return array
* @throws \MyParcelNL\Sdk\src\Exception\MissingFieldException
*/
public function encodeStreet(array $consignmentEncoded): array
{
if (self::CC_BE === $this->getCountry()) {
return array_merge_recursive($consignmentEncoded, [
'recipient' => [
'street' => $this->getStreet(true),
'street_additional_info' => $this->getStreetAdditionalInfo(),
'number' => $this->getNumber(),
'box_number' => (string) $this->getBoxNumber(),
],
]);
}

return parent::encodeStreet($consignmentEncoded);
}

/**
* @return string
*/
Expand Down

0 comments on commit 049a1ac

Please sign in to comment.