Skip to content

Commit 338dfd5

Browse files
Merge pull request #8 from giorgiopogliani/patch-1
Allow CarbonImmutable as date instance
2 parents 8d34a93 + 48baa2b commit 338dfd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/DatetimeParser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Whitecube\LaravelTimezones;
44

55
use Illuminate\Database\Eloquent\Concerns\HasAttributes;
6-
use Illuminate\Support\Carbon;
6+
use Carbon\CarbonInterface;
77

88
class DatetimeParser
99
{
@@ -19,9 +19,9 @@ class DatetimeParser
1919
*
2020
* @param mixed $value
2121
* @param null|string $format
22-
* @return Carbon
22+
* @return CarbonInterace
2323
*/
24-
public function parse(mixed $value, ?string $format): Carbon
24+
public function parse(mixed $value, ?string $format): CarbonInterface
2525
{
2626
$this->format = $format;
2727

@@ -38,4 +38,4 @@ public function getDateFormat()
3838
{
3939
return $this->format;
4040
}
41-
}
41+
}

0 commit comments

Comments
 (0)