| Total Complexity | 6 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types = 1); |
||
| 8 | class CustomerInfoResponse |
||
| 9 | { |
||
| 10 | |||
| 11 | /** @var DateTimeImmutable */ |
||
| 12 | private $responseDateTime; |
||
| 13 | |||
| 14 | /** @var ResultCode */ |
||
| 15 | private $resultCode; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | private $resultMessage; |
||
| 19 | |||
| 20 | /** @var string|null */ |
||
| 21 | private $customerId; |
||
| 22 | |||
| 23 | 1 | public function __construct( |
|
| 24 | DateTimeImmutable $responseDateTime, |
||
| 25 | ResultCode $resultCode, |
||
| 26 | string $resultMessage, |
||
| 27 | ?string $customerId = null |
||
| 28 | ) |
||
| 29 | { |
||
| 30 | 1 | if ($customerId !== null) { |
|
| 31 | 1 | Validator::checkCustomerId($customerId); |
|
| 32 | } |
||
| 33 | |||
| 34 | 1 | $this->responseDateTime = $responseDateTime; |
|
| 35 | 1 | $this->resultCode = $resultCode; |
|
| 36 | 1 | $this->resultMessage = $resultMessage; |
|
| 37 | 1 | $this->customerId = $customerId; |
|
| 38 | 1 | } |
|
| 39 | |||
| 40 | 1 | public function getResponseDateTime(): DateTimeImmutable |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | public function getResultCode(): ResultCode |
|
| 46 | { |
||
| 47 | 1 | return $this->resultCode; |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | public function getResultMessage(): string |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | public function getCustomerId(): ?string |
|
| 61 |