Skip to content

Commit

Permalink
incompatible-binary-operands
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-worman committed May 21, 2024
1 parent a10cb35 commit 5447e3e
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,16 +274,18 @@ public static function analyze(
&& (!UnionTypeComparator::isContainedBy($codebase, $stmt_left_type, $stmt_right_type)
|| !UnionTypeComparator::isContainedBy($codebase, $stmt_right_type, $stmt_left_type))
// It is okay if both sides implement \DateTimeInterface
&& !(UnionTypeComparator::isContainedBy(
$codebase,
$stmt_left_type,
new Union([new TNamedObject(DateTimeInterface::class)]),
&& !(
UnionTypeComparator::isContainedBy(
$codebase,
$stmt_left_type,
new Union([new TNamedObject(DateTimeInterface::class)]),
)
&& UnionTypeComparator::isContainedBy(
$codebase,
$stmt_right_type,
new Union([new TNamedObject(DateTimeInterface::class)]),
))
)
)
) {
IssueBuffer::maybeAdd(
new InvalidOperand(
Expand Down

0 comments on commit 5447e3e

Please sign in to comment.