with cast tests

This commit is contained in:
icefox 2026-02-18 20:29:13 -03:00
parent afb47c1977
commit 3a26a2e0c2
No known key found for this signature in database
8 changed files with 154 additions and 3 deletions

View file

@ -7,7 +7,7 @@ use Illuminate\Support\Carbon;
class CarbonPeriodMapper
{
public function map(mixed $value): CarbonPeriodImmutable
public function cast(mixed $value): CarbonPeriodImmutable
{
return new CarbonPeriodImmutable(Carbon::parse($value['start']), Carbon::parse($value['end']));
}