Menu

Error Identifier: pureFunction.nonOptionalParameterPassed

← Back to pureFunction.*

Every error reported by PHPStan has an error identifier. Here’s a list of all error identifiers. In PHPStan Pro you can see the error identifier next to each error and filter errors by their identifiers.

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

// @phpstan-ignore pureFunction.nonOptionalParameterPassed
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: pureFunction.nonOptionalParameterPassed

Rules that report this error #

  • PHPStan\Rules\Pure\PureFunctionRule [1]
  • PHPStan\Rules\Pure\PureMethodRule [1]
  • PHPStan\Rules\Pure\PurePropertyHookRule [1]
Theme
A
© 2026 PHPStan s.r.o.