Skip to content

Commit 4359d1a

Browse files
Change the return type of lastTimeSomethingHasHappenedWithIt() to Carbon
1 parent 95c5645 commit 4359d1a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Contracts/JobExecution.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
namespace Konekt\History\Contracts;
1616

1717
use Illuminate\Contracts\Auth\Authenticatable;
18+
use Illuminate\Support\Carbon;
1819
use Illuminate\Support\Collection;
1920

2021
interface JobExecution
@@ -49,7 +50,7 @@ public function logInfo(string $message, array $context = []): JobExecutionLog;
4950

5051
public function logDebug(string $message, array $context = []): JobExecutionLog;
5152

52-
public function lastTimeSomethingHasHappenedWithIt(): \DateTimeInterface;
53+
public function lastTimeSomethingHasHappenedWithIt(): Carbon;
5354

5455
/** @return Collection|JobExecutionLog[] */
5556
public function getLogs(): Collection;

src/Models/JobExecution.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function getUser(): ?Authenticatable
193193
return $this->user;
194194
}
195195

196-
public function lastTimeSomethingHasHappenedWithIt(): \DateTimeInterface
196+
public function lastTimeSomethingHasHappenedWithIt(): Carbon
197197
{
198198
$lastLogEventDate = $this->logs()->max('happened_at');
199199
$dates = [

0 commit comments

Comments
 (0)