Skip to content

Commit 80e3d7a

Browse files
Fix ObjectType::equals
1 parent c652f44 commit 80e3d7a

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,12 +1473,6 @@ parameters:
14731473
count: 1
14741474
path: src/Type/ObjectShapeType.php
14751475

1476-
-
1477-
rawMessage: 'Doing instanceof PHPStan\Type\Enum\EnumCaseObjectType is error-prone and deprecated. Use Type::getEnumCases() instead.'
1478-
identifier: phpstanApi.instanceofType
1479-
count: 1
1480-
path: src/Type/ObjectType.php
1481-
14821476
-
14831477
rawMessage: Doing instanceof PHPStan\Type\Generic\GenericObjectType is error-prone and deprecated.
14841478
identifier: phpstanApi.instanceofType

src/Type/ObjectType.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -624,11 +624,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
624624

625625
public function equals(Type $type): bool
626626
{
627-
if (!$type instanceof self) {
628-
return false;
629-
}
630-
631-
if ($type instanceof EnumCaseObjectType) {
627+
if (get_class($this) !== get_class($type)) {
632628
return false;
633629
}
634630

0 commit comments

Comments
 (0)