Skip to content

Commit cb2dad5

Browse files
authored
Merge pull request #4 from abdelhamiderrahmouni/master
Refactor lastReceivedAt type to support CarbonImmutable
2 parents 2698584 + d1e395b commit cb2dad5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Commands/HandleMessageReceived.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
namespace DirectoryTree\ImapEngine\Laravel\Commands;
44

5+
use Carbon\CarbonInterface;
56
use DirectoryTree\ImapEngine\Laravel\Events\MessageReceived;
67
use DirectoryTree\ImapEngine\MessageInterface;
7-
use Illuminate\Support\Carbon;
88
use Illuminate\Support\Facades\Date;
99
use Illuminate\Support\Facades\Event;
1010

@@ -16,7 +16,7 @@ class HandleMessageReceived
1616
public function __construct(
1717
protected WatchMailbox $command,
1818
protected int &$attempts = 0,
19-
protected ?Carbon &$lastReceivedAt = null,
19+
protected ?CarbonInterface &$lastReceivedAt = null,
2020
) {}
2121

2222
/**

src/Events/MailboxWatchAttemptsExceeded.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace DirectoryTree\ImapEngine\Laravel\Events;
44

5-
use Carbon\Carbon;
5+
use Carbon\CarbonInterface;
66
use Exception;
77

88
class MailboxWatchAttemptsExceeded
@@ -14,6 +14,6 @@ public function __construct(
1414
public string $mailbox,
1515
public int $attempts,
1616
public Exception $exception,
17-
public ?Carbon $lastReceivedAt = null,
17+
public ?CarbonInterface $lastReceivedAt = null,
1818
) {}
1919
}

0 commit comments

Comments
 (0)