File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33namespace Statamic \Http \Middleware \CP ;
44
5- use Carbon \Carbon ;
5+ use Carbon \CarbonInterface ;
66use Closure ;
77use DateTime ;
88use Illuminate \Support \Facades \Date ;
@@ -24,7 +24,7 @@ public function handle($request, Closure $next)
2424
2525 // Get original Carbon format so it can be restored later.
2626 $ originalToStringFormat = $ this ->getToStringFormat ();
27- Date::setToStringFormat (function (Carbon $ date ) {
27+ Date::setToStringFormat (function (CarbonInterface $ date ) {
2828 return $ date ->setTimezone (Statamic::displayTimezone ())->format (Statamic::dateFormat ());
2929 });
3030
Original file line number Diff line number Diff line change 22
33namespace Statamic \Http \Middleware ;
44
5- use Carbon \Carbon ;
5+ use Carbon \CarbonInterface ;
66use Closure ;
77use Illuminate \Support \Facades \Date ;
88use ReflectionClass ;
@@ -32,7 +32,7 @@ public function handle($request, Closure $next)
3232
3333 // Get original Carbon format so it can be restored later.
3434 $ originalToStringFormat = $ this ->getToStringFormat ();
35- Date::setToStringFormat (function (Carbon $ date ) {
35+ Date::setToStringFormat (function (CarbonInterface $ date ) {
3636 return $ date ->setTimezone (Statamic::displayTimezone ())->format (Statamic::dateFormat ());
3737 });
3838
You can’t perform that action at this time.
0 commit comments