6 Commits
1.0.0 ... 1.0.1

Author SHA1 Message Date
c867f0acc6 Aktualisieren von Account.php 2025-06-17 09:46:29 +02:00
abd1beead7 Aktualisieren von Client.php 2025-06-17 09:44:56 +02:00
c33c1c1e33 Merge branch 'afosto:master' into main 2024-12-23 14:45:08 +01:00
Peter Bakker
8e201aadc3 Merge pull request #71 from bessone/master
initialIP removed from API
2024-12-23 08:35:47 +01:00
Riccardo Bessone
720a7b69a6 No more initial ip in account constructor 2024-12-09 16:59:08 +01:00
Riccardo Bessone
80d2fb8871 Remove initial ip from Account 2024-12-09 16:58:32 +01:00
2 changed files with 1 additions and 18 deletions

View File

@@ -359,7 +359,7 @@ class Client
$data = json_decode((string)$response->getBody(), true); $data = json_decode((string)$response->getBody(), true);
$accountURL = $response->getHeaderLine('Location'); $accountURL = $response->getHeaderLine('Location');
$date = (new \DateTime())->setTimestamp(strtotime($data['createdAt'])); $date = (new \DateTime())->setTimestamp(strtotime($data['createdAt']));
return new Account($data['contact'], $date, ($data['status'] == 'valid'), $accountURL); return new Account($date, ($data['status'] == 'valid'), $accountURL);
} }
/** /**

View File

@@ -4,12 +4,6 @@ namespace Afosto\Acme\Data;
class Account class Account
{ {
/**
* @var array
*/
protected $contact;
/** /**
* @var string * @var string
*/ */
@@ -34,12 +28,10 @@ class Account
* @param string $accountURL * @param string $accountURL
*/ */
public function __construct( public function __construct(
array $contact,
\DateTime $createdAt, \DateTime $createdAt,
bool $isValid, bool $isValid,
string $accountURL string $accountURL
) { ) {
$this->contact = $contact;
$this->createdAt = $createdAt; $this->createdAt = $createdAt;
$this->isValid = $isValid; $this->isValid = $isValid;
$this->accountURL = $accountURL; $this->accountURL = $accountURL;
@@ -72,15 +64,6 @@ class Account
return $this->accountURL; return $this->accountURL;
} }
/**
* Return contact data
* @return array
*/
public function getContact(): array
{
return $this->contact;
}
/** /**
* Returns validation status * Returns validation status
* @return bool * @return bool