Skip to content

Commit 349a9e2

Browse files
committed
Fix type
1 parent 0c5ebd2 commit 349a9e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Commands/HandleMessageReceived.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
use DirectoryTree\ImapEngine\Laravel\Events\MessageReceived;
66
use DirectoryTree\ImapEngine\MessageInterface;
7+
use Illuminate\Support\Carbon;
8+
use Illuminate\Support\Facades\Date;
79
use Illuminate\Support\Facades\Event;
810

911
class HandleMessageReceived
@@ -14,7 +16,7 @@ class HandleMessageReceived
1416
public function __construct(
1517
protected WatchMailbox $command,
1618
protected int &$attempts,
17-
protected ?int &$lastReceivedAt = null,
19+
protected ?Carbon &$lastReceivedAt = null,
1820
) {}
1921

2022
/**
@@ -28,7 +30,7 @@ public function __invoke(MessageInterface $message): void
2830

2931
$this->attempts = 0;
3032

31-
$this->lastReceivedAt = time();
33+
$this->lastReceivedAt = Date::now();
3234

3335
Event::dispatch(new MessageReceived($message));
3436
}

0 commit comments

Comments
 (0)