1
0
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:
Brown 2020-09-19 18:24:36 -04:00 committed by Daniil Gentili
parent 5302936e76
commit 6a4df30868
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
4 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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

View File

@ -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);

View File

@ -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