Skip to content

Commit

Permalink
Using Carbon\CarbonInterface instead of Illuminate\Support\Carbon (
Browse files Browse the repository at this point in the history
…#55)

* Using `Carbon\CarbonInterface` instead of `Illuminate\Support\Carbon`

* Discard `compose.json`
  • Loading branch information
leandrogehlen authored Sep 27, 2024
1 parent e8eadcb commit 391849c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Trend.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

namespace Flowframe\Trend;

use Carbon\CarbonInterface;
use Carbon\CarbonPeriod;
use Error;
use Flowframe\Trend\Adapters\MySqlAdapter;
use Flowframe\Trend\Adapters\PgsqlAdapter;
use Flowframe\Trend\Adapters\SqliteAdapter;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;

class Trend
{
public string $interval;

public Carbon $start;
public CarbonInterface $start;

public Carbon $end;
public CarbonInterface $end;

public string $dateColumn = 'created_at';

Expand Down Expand Up @@ -145,7 +145,7 @@ public function mapValuesToDates(Collection $values): Collection
));

$placeholders = $this->getDatePeriod()->map(
fn (Carbon $date) => new TrendValue(
fn (CarbonInterface $date) => new TrendValue(
date: $date->format($this->getCarbonDateFormat()),
aggregate: 0,
)
Expand Down

0 comments on commit 391849c

Please sign in to comment.