We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eff1365 commit 4e0694fCopy full SHA for 4e0694f
1 file changed
src/Rules/Api/ApiInstanceofTypeRule.php
@@ -32,6 +32,7 @@
32
use PHPStan\Type\Constant\ConstantStringType;
33
use PHPStan\Type\ConstantScalarType;
34
use PHPStan\Type\Enum\EnumCaseObjectType;
35
+use PHPStan\Type\ErrorType;
36
use PHPStan\Type\FloatType;
37
use PHPStan\Type\Generic\GenericClassStringType;
38
use PHPStan\Type\Generic\GenericObjectType;
@@ -79,6 +80,7 @@ final class ApiInstanceofTypeRule implements Rule
79
80
IntersectionType::class => null,
81
ConstantScalarType::class => 'Type::isConstantScalarValue() or Type::getConstantScalarTypes() or Type::getConstantScalarValues()',
82
ObjectShapeType::class => 'Type::isObject() and Type::hasProperty()',
83
+ ErrorType::class => 'Type::isError()',
84
85
// accessory types
86
NonEmptyArrayType::class => 'Type::isIterableAtLeastOnce()',
0 commit comments