Skip to content

Commit 391849c

Browse files
Using Carbon\CarbonInterface instead of Illuminate\Support\Carbon (#55)
* Using `Carbon\CarbonInterface` instead of `Illuminate\Support\Carbon` * Discard `compose.json`
1 parent e8eadcb commit 391849c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Trend.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
namespace Flowframe\Trend;
44

5+
use Carbon\CarbonInterface;
56
use Carbon\CarbonPeriod;
67
use Error;
78
use Flowframe\Trend\Adapters\MySqlAdapter;
89
use Flowframe\Trend\Adapters\PgsqlAdapter;
910
use Flowframe\Trend\Adapters\SqliteAdapter;
1011
use Illuminate\Database\Eloquent\Builder;
11-
use Illuminate\Support\Carbon;
1212
use Illuminate\Support\Collection;
1313

1414
class Trend
1515
{
1616
public string $interval;
1717

18-
public Carbon $start;
18+
public CarbonInterface $start;
1919

20-
public Carbon $end;
20+
public CarbonInterface $end;
2121

2222
public string $dateColumn = 'created_at';
2323

@@ -145,7 +145,7 @@ public function mapValuesToDates(Collection $values): Collection
145145
));
146146

147147
$placeholders = $this->getDatePeriod()->map(
148-
fn (Carbon $date) => new TrendValue(
148+
fn (CarbonInterface $date) => new TrendValue(
149149
date: $date->format($this->getCarbonDateFormat()),
150150
aggregate: 0,
151151
)

0 commit comments

Comments
 (0)