Skip to content

Commit 4e0694f

Browse files
committed
update ApiInstanceofTypeRule
1 parent eff1365 commit 4e0694f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Rules/Api/ApiInstanceofTypeRule.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use PHPStan\Type\Constant\ConstantStringType;
3333
use PHPStan\Type\ConstantScalarType;
3434
use PHPStan\Type\Enum\EnumCaseObjectType;
35+
use PHPStan\Type\ErrorType;
3536
use PHPStan\Type\FloatType;
3637
use PHPStan\Type\Generic\GenericClassStringType;
3738
use PHPStan\Type\Generic\GenericObjectType;
@@ -79,6 +80,7 @@ final class ApiInstanceofTypeRule implements Rule
7980
IntersectionType::class => null,
8081
ConstantScalarType::class => 'Type::isConstantScalarValue() or Type::getConstantScalarTypes() or Type::getConstantScalarValues()',
8182
ObjectShapeType::class => 'Type::isObject() and Type::hasProperty()',
83+
ErrorType::class => 'Type::isError()',
8284

8385
// accessory types
8486
NonEmptyArrayType::class => 'Type::isIterableAtLeastOnce()',

0 commit comments

Comments
 (0)