diff --git a/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php b/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php index 3b002d338..3d1930a2e 100644 --- a/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php +++ b/src/Psalm/Internal/Analyzer/Statements/UnusedAssignmentRemover.php @@ -115,8 +115,8 @@ class UnusedAssignmentRemover $this->removed_unref_vars[$var_id] = $original_location; } } - - private function getPartialRemovalBounds( + + private static function getPartialRemovalBounds( Codebase $codebase, CodeLocation $var_loc, int $end_bound, @@ -350,7 +350,7 @@ class UnusedAssignmentRemover return [null, $search_level]; } } - + public function checkIfVarRemoved(string $var_id, CodeLocation $var_loc): bool { return array_key_exists($var_id, $this->removed_unref_vars) diff --git a/src/Psalm/Internal/Codebase/ClassLikes.php b/src/Psalm/Internal/Codebase/ClassLikes.php index 13d8df1ff..c86699c27 100644 --- a/src/Psalm/Internal/Codebase/ClassLikes.php +++ b/src/Psalm/Internal/Codebase/ClassLikes.php @@ -660,7 +660,7 @@ class ClassLikes { $this->classlike_aliases[$alias_name] = $fq_class_name; } - + public function getUnAliasedName(string $alias_name): string { $alias_name_lc = strtolower($alias_name); @@ -753,7 +753,7 @@ class ClassLikes } } - public function makeImmutable( + public static function makeImmutable( PhpParser\Node\Stmt\Class_ $class_stmt, \Psalm\Internal\Analyzer\ProjectAnalyzer $project_analyzer, string $file_path diff --git a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php index 350d75090..32f54cbab 100644 --- a/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/PartialParserVisitor.php @@ -327,7 +327,7 @@ class PartialParserVisitor extends PhpParser\NodeVisitorAbstract implements PhpP /** * @psalm-pure */ - private function balanceBrackets(string $fake_class) : string + private static function balanceBrackets(string $fake_class) : string { $tokens = \token_get_all($fake_class); diff --git a/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php b/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php index a0c37df58..51c8b8742 100644 --- a/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php +++ b/src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php @@ -3813,7 +3813,7 @@ class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements PhpParse } } - public function getUnresolvedClassConstExpr( + public static function getUnresolvedClassConstExpr( PhpParser\Node\Expr $stmt, Aliases $aliases, string $fq_classlike_name