| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 57 | 2 | public static function fromApiResponse(array $amazonApiResponse): self |
|
| 58 | { |
||
| 59 | 2 | $deviceAddressInformation = new self(); |
|
| 60 | |||
| 61 | 2 | $deviceAddressInformation->stateOrRegion = PropertyHelper::checkNullValue($amazonApiResponse, 'stateOrRegion'); |
|
| 62 | 2 | $deviceAddressInformation->city = PropertyHelper::checkNullValue($amazonApiResponse, 'city'); |
|
| 63 | 2 | $deviceAddressInformation->countryCode = PropertyHelper::checkNullValue($amazonApiResponse, 'countryCode'); |
|
| 64 | 2 | $deviceAddressInformation->postalCode = PropertyHelper::checkNullValue($amazonApiResponse, 'postalCode'); |
|
| 65 | 2 | $deviceAddressInformation->addressLine1 = PropertyHelper::checkNullValue($amazonApiResponse, 'addressLine1'); |
|
| 66 | 2 | $deviceAddressInformation->addressLine2 = PropertyHelper::checkNullValue($amazonApiResponse, 'addressLine2'); |
|
| 67 | 2 | $deviceAddressInformation->addressLine3 = PropertyHelper::checkNullValue($amazonApiResponse, 'addressLine3'); |
|
| 68 | 2 | $deviceAddressInformation->districtOrCounty = PropertyHelper::checkNullValue($amazonApiResponse, 'districtOrCounty'); |
|
| 69 | |||
| 70 | 2 | return $deviceAddressInformation; |
|
| 71 | } |
||
| 73 |