Menu
Error Identifier: argument.byRef
Error identifiers like argument.byRef in PHPStan can be used to ignore errors locally using a comment:
// @phpstan-ignore argument.byRef
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: argument.byRef
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\ClassAttributesRule [1] [2] [3]
- PHPStan\Rules\Classes\ClassConstantAttributesRule [1] [2] [3]
- PHPStan\Rules\Classes\InstantiationRule [1] [2] [3]
- PHPStan\Rules\EnumCases\EnumCaseAttributesRule [1] [2] [3]
- PHPStan\Rules\Functions\ArrowFunctionAttributesRule [1] [2] [3]
- PHPStan\Rules\Functions\CallCallablesRule [1] [2] [3]
- PHPStan\Rules\Functions\CallToFunctionParametersRule [1] [2] [3]
- PHPStan\Rules\Functions\CallUserFuncRule [1] [2] [3]
- PHPStan\Rules\Functions\ClosureAttributesRule [1] [2] [3]
- PHPStan\Rules\Functions\FunctionAttributesRule [1] [2] [3]
- PHPStan\Rules\Functions\ParamAttributesRule [1] [2] [3]
- PHPStan\Rules\Methods\CallMethodsRule [1] [2] [3]
- PHPStan\Rules\Methods\CallStaticMethodsRule [1] [2] [3]
- PHPStan\Rules\Methods\MethodAttributesRule [1] [2] [3]
- PHPStan\Rules\Properties\PropertyAttributesRule [1] [2] [3]