Move notification to the new paradigm

This commit is contained in:
Hypolite Petovan
2021-09-18 00:03:32 -04:00
parent bc0734e0f1
commit 7a2d5f6a8e
16 changed files with 175 additions and 420 deletions
+2 -2
View File
@@ -66,11 +66,11 @@ class Notification extends BaseDataTransferObject
*
* @throws HttpException\InternalServerErrorException|Exception
*/
public function __construct(int $id, string $type, string $created_at, Account $account = null, Status $status = null)
public function __construct(int $id, string $type, \DateTime $created_at, Account $account = null, Status $status = null)
{
$this->id = (string)$id;
$this->type = $type;
$this->created_at = DateTimeFormat::utc($created_at, DateTimeFormat::JSON);
$this->created_at = $created_at->format(DateTimeFormat::JSON);
$this->account = $account->toArray();
if (!empty($status)) {