From 80d2fb8871c87294f9c0b6c2b6f567f9cf45f171 Mon Sep 17 00:00:00 2001 From: Riccardo Bessone Date: Mon, 9 Dec 2024 16:58:32 +0100 Subject: [PATCH 1/2] Remove initial ip from Account --- src/Data/Account.php | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/Data/Account.php b/src/Data/Account.php index 9a957c8..99f8b66 100644 --- a/src/Data/Account.php +++ b/src/Data/Account.php @@ -20,11 +20,6 @@ class Account */ protected $isValid; - /** - * @var - */ - protected $initialIp; - /** * @var string */ @@ -36,17 +31,14 @@ class Account * @param array $contact * @param \DateTime $createdAt * @param bool $isValid - * @param string $initialIp * @param string $accountURL */ public function __construct( array $contact, \DateTime $createdAt, bool $isValid, - string $initialIp, string $accountURL ) { - $this->initialIp = $initialIp; $this->contact = $contact; $this->createdAt = $createdAt; $this->isValid = $isValid; @@ -89,15 +81,6 @@ public function getContact(): array return $this->contact; } - /** - * Return initial IP - * @return string - */ - public function getInitialIp(): string - { - return $this->initialIp; - } - /** * Returns validation status * @return bool From 720a7b69a6eba4e9c545d2720286ea48b50d7006 Mon Sep 17 00:00:00 2001 From: Riccardo Bessone Date: Mon, 9 Dec 2024 16:59:08 +0100 Subject: [PATCH 2/2] No more initial ip in account constructor --- src/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Client.php b/src/Client.php index 17fef64..4a9fe7d 100644 --- a/src/Client.php +++ b/src/Client.php @@ -359,7 +359,7 @@ public function getAccount(): Account $data = json_decode((string)$response->getBody(), true); $accountURL = $response->getHeaderLine('Location'); $date = (new \DateTime())->setTimestamp(strtotime($data['createdAt'])); - return new Account($data['contact'], $date, ($data['status'] == 'valid'), $data['initialIp'], $accountURL); + return new Account($data['contact'], $date, ($data['status'] == 'valid'), $accountURL); } /**