analyse/functions/invalid-pure
In the analyse-essential preset and every stricter one. Report only.
Configuration
[analyse.rules]
"functions/invalid-pure" = "on"
To skip it in some files or lines, add an ignore comment.
Replaces
PureFunctionRule(phpstan-classes)impure.betweenPhpTags(phpstan)impure.die(phpstan)impure.echo(phpstan)impure.eval(phpstan)impure.exit(phpstan)impure.functionCall(phpstan)impure.global(phpstan)impure.include(phpstan)impure.methodCall(phpstan)impure.new(phpstan)impure.print(phpstan)impure.propertyAssign(phpstan)impure.propertyAssignByRef(phpstan)impure.propertyUnset(phpstan)impure.require(phpstan)impure.static(phpstan)impure.staticPropertyAccess(phpstan)impure.superglobal(phpstan)impure.yield(phpstan)impure.yieldFrom(phpstan)possiblyImpure.betweenPhpTags(phpstan)possiblyImpure.die(phpstan)possiblyImpure.echo(phpstan)possiblyImpure.eval(phpstan)possiblyImpure.exit(phpstan)possiblyImpure.functionCall(phpstan)possiblyImpure.global(phpstan)possiblyImpure.include(phpstan)possiblyImpure.methodCall(phpstan)possiblyImpure.new(phpstan)possiblyImpure.print(phpstan)possiblyImpure.propertyAssign(phpstan)possiblyImpure.propertyAssignByRef(phpstan)possiblyImpure.propertyUnset(phpstan)possiblyImpure.require(phpstan)possiblyImpure.static(phpstan)possiblyImpure.staticPropertyAccess(phpstan)possiblyImpure.superglobal(phpstan)possiblyImpure.yield(phpstan)possiblyImpure.yieldFrom(phpstan)pureFunction.nonOptionalParameterPassed(phpstan)pureFunction.parameterByRef(phpstan)pureFunction.parameterPassedNotByRef(phpstan)pureFunction.redundantUnlessCallable(phpstan)pureMethod.nonOptionalParameterPassed(phpstan)pureMethod.parameterByRef(phpstan)pureMethod.parameterPassedNotByRef(phpstan)pureMethod.redundantUnlessCallable(phpstan)purePropertyHook.nonOptionalParameterPassed(phpstan)purePropertyHook.parameterByRef(phpstan)purePropertyHook.parameterPassedNotByRef(phpstan)purePropertyHook.redundantUnlessCallable(phpstan)void.pure(phpstan)