Menu

Error Identifier: varTag.noVariable

Error identifiers like varTag.noVariable in PHPStan can be used to ignore errors locally using a comment:

// @phpstan-ignore varTag.noVariable
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: varTag.noVariable

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:

Theme
A
© 2025 PHPStan s.r.o.