Skip to content

Commit e283ae6

Browse files
committed
simplify
1 parent e51250f commit e283ae6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Type/MixedType.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use PHPStan\Type\Constant\ConstantFloatType;
3333
use PHPStan\Type\Constant\ConstantIntegerType;
3434
use PHPStan\Type\Constant\ConstantStringType;
35+
use PHPStan\Type\Generic\GenericObjectType;
3536
use PHPStan\Type\Generic\TemplateMixedType;
3637
use PHPStan\Type\Generic\TemplateType;
3738
use PHPStan\Type\Traits\NonGeneralizableTypeTrait;
@@ -312,7 +313,11 @@ public function getCallableParametersAcceptors(ClassMemberAccessAnswerer $scope)
312313

313314
public function equals(Type $type): bool
314315
{
315-
if (!in_array(get_class($type), [self::class, TemplateMixedType::class], true)) {
316+
if (!$type instanceof self) {
317+
return false;
318+
}
319+
320+
if ($type instanceof ErrorType) {
316321
return false;
317322
}
318323

0 commit comments

Comments
 (0)