Skip to content

Commit c25366e

Browse files
Revert "Try"
This reverts commit aa95f94.
1 parent aa95f94 commit c25366e

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/Type/ObjectType.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
use PHPStan\Type\Enum\EnumCaseObjectType;
4343
use PHPStan\Type\Generic\GenericClassStringType;
4444
use PHPStan\Type\Generic\GenericObjectType;
45-
use PHPStan\Type\Generic\TemplateType;
4645
use PHPStan\Type\Generic\TemplateTypeHelper;
4746
use PHPStan\Type\Traits\MaybeIterableTypeTrait;
4847
use PHPStan\Type\Traits\NonArrayTypeTrait;
@@ -626,19 +625,7 @@ public function isSuperTypeOf(Type $type): IsSuperTypeOfResult
626625

627626
public function equals(Type $type): bool
628627
{
629-
if (!$type instanceof self) {
630-
return false;
631-
}
632-
633-
if ($type instanceof EnumCaseObjectType) {
634-
return false;
635-
}
636-
637-
if ($type instanceof TemplateType) {
638-
return false;
639-
}
640-
641-
if ($type instanceof GenericObjectType && !$this instanceof GenericObjectType) {
628+
if (get_class($type) !== static::class) {
642629
return false;
643630
}
644631

0 commit comments

Comments
 (0)