Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
update: Use keys to assign matched address.
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsDelaguardia committed Sep 12, 2023
1 parent 402c59a commit a33ed74
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/AddressVerification/MatchedAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ class MatchedAddress extends Address
*/
public function __construct(array $matchedAddress)
{
list(
$this->name,
$this->phone,
$this->email,
$this->companyName,
$this->addressLine1,
$this->addressLine2,
$this->addressLine3,
$this->cityLocality,
$this->stateProvince,
$this->postalCode,
$this->countryCode,
$this->addressResidentialIndicator
) = array_values($matchedAddress);
$this->name = $matchedAddress['name'];
$this->phone = $matchedAddress['phone'];
$this->email = $matchedAddress['email'];
$this->companyName = $matchedAddress['company_name'];
$this->addressLine1 = $matchedAddress['address_line1'];
$this->addressLine2 = $matchedAddress['address_line2'];
$this->addressLine3 = $matchedAddress['address_line3'];
$this->cityLocality = $matchedAddress['city_locality'];
$this->stateProvince = $matchedAddress['state_province'];
$this->postalCode = $matchedAddress['postal_code'];
$this->countryCode = $matchedAddress['country_code'];
$this->addressResidentialIndicator = $matchedAddress['address_residential_indicator'];
}
}

0 comments on commit a33ed74

Please sign in to comment.