Menu
Error Identifier: missingType.generics
Error identifiers like missingType.generics in PHPStan can be used to ignore errors locally using a comment:
// @phpstan-ignore missingType.generics
codeThatProducesTheError();
You can also use only the identifier
key to ignore all errors of the same type in your configuration file in the ignoreErrors
parameter:
parameters:
ignoreErrors:
-
identifier: missingType.generics
You can see what identifiers are attached to reported errors by running PHPStan with -v
and using the table
error formatter. Here’s a list of all error identifiers.
You can also see error identifiers while browsing errors in PHPStan Pro.
This identifier is reported by these rules:
- PHPStan\Rules\Classes\LocalTypeAliasesRule [1]
- PHPStan\Rules\Classes\LocalTypeTraitAliasesRule [1]
- PHPStan\Rules\Classes\LocalTypeTraitUseAliasesRule [1]
- PHPStan\Rules\Classes\MethodTagRule [1]
- PHPStan\Rules\Classes\MethodTagTraitRule [1]
- PHPStan\Rules\Classes\MethodTagTraitUseRule [1]
- PHPStan\Rules\Classes\MixinRule [1]
- PHPStan\Rules\Classes\MixinTraitRule [1]
- PHPStan\Rules\Classes\MixinTraitUseRule [1]
- PHPStan\Rules\Classes\PropertyTagRule [1]
- PHPStan\Rules\Classes\PropertyTagTraitRule [1]
- PHPStan\Rules\Classes\PropertyTagTraitUseRule [1]
- PHPStan\Rules\Constants\MissingClassConstantTypehintRule [1]
- PHPStan\Rules\Functions\MissingFunctionParameterTypehintRule [1]
- PHPStan\Rules\Functions\MissingFunctionReturnTypehintRule [1]
- PHPStan\Rules\Generics\ClassAncestorsRule [1]
- PHPStan\Rules\Generics\EnumAncestorsRule [1]
- PHPStan\Rules\Generics\InterfaceAncestorsRule [1]
- PHPStan\Rules\Generics\UsedTraitsRule [1]
- PHPStan\Rules\Methods\MissingMethodParameterTypehintRule [1]
- PHPStan\Rules\Methods\MissingMethodReturnTypehintRule [1]
- PHPStan\Rules\Methods\MissingMethodSelfOutTypeRule [1]
- PHPStan\Rules\PhpDoc\FunctionAssertRule [1]
- PHPStan\Rules\PhpDoc\InvalidPhpDocVarTagTypeRule [1]
- PHPStan\Rules\PhpDoc\MethodAssertRule [1]
- PHPStan\Rules\Properties\MissingPropertyTypehintRule [1]