Skip to content

Commit

Permalink
[6.x] Removed $value instanceof Carbon redundancy (#30932)
Browse files Browse the repository at this point in the history
`Illuminate\Support\Carbon extends \Carbon\Carbon implements \Carbon\CarbonInterface`
  • Loading branch information
Andrey Helldar authored and taylorotwell committed Dec 25, 2019
1 parent 8381ef6 commit 225e043
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -773,7 +773,7 @@ protected function asDateTime($value)
// If this value is already a Carbon instance, we shall just return it as is.
// This prevents us having to re-instantiate a Carbon instance when we know
// it already is one, which wouldn't be fulfilled by the DateTime check.
if ($value instanceof Carbon || $value instanceof CarbonInterface) {
if ($value instanceof CarbonInterface) {
return Date::instance($value);
}

Expand Down

0 comments on commit 225e043

Please sign in to comment.