mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 22:01:48 +01:00
Meke staticy methods properly static
This commit is contained in:
parent
5302936e76
commit
6a4df30868
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user