Skip to content

Commit

Permalink
Defer type-resolving in UseIdenticalOverEqualWithSameTypeRector (#3755)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 7, 2023
1 parent 31c1deb commit eee943b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public function getNodeTypes(): array
public function refactor(Node $node): ?Node
{
$leftStaticType = $this->getType($node->left);
$rightStaticType = $this->getType($node->right);

// objects can be different by content
if ($leftStaticType instanceof ObjectType) {
Expand All @@ -84,6 +83,7 @@ public function refactor(Node $node): ?Node
return null;
}

$rightStaticType = $this->getType($node->right);
if ($rightStaticType instanceof MixedType) {
return null;
}
Expand Down

0 comments on commit eee943b

Please sign in to comment.