diff --git a/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php b/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php index 264d397fc..d742d81ab 100644 --- a/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php @@ -584,6 +584,7 @@ abstract class FunctionLikeAnalyzer extends SourceAnalyzer && !$this->inferred_impure && ($this->function instanceof Function_ || $this->function instanceof ClassMethod) + && $storage->params ) { $manipulator = FunctionDocblockManipulator::getForFunction( $project_analyzer, diff --git a/src/Psalm/Issue/ImpureVariable.php b/src/Psalm/Issue/ImpureVariable.php new file mode 100644 index 000000000..51e87f448 --- /dev/null +++ b/src/Psalm/Issue/ImpureVariable.php @@ -0,0 +1,8 @@ + [ + '