mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Remove unused code
This commit is contained in:
parent
ceebc9e81d
commit
86d52bbf4f
@ -612,8 +612,6 @@ class Analyzer
|
||||
|
||||
$this->mixed_counts = $file_reference_provider->getTypeCoverage();
|
||||
|
||||
$classlikes = $codebase->classlikes;
|
||||
|
||||
foreach ($changed_members as $file_path => $members_by_file) {
|
||||
foreach ($members_by_file as $changed_member => $_) {
|
||||
if (!strpos($changed_member, '&')) {
|
||||
@ -622,7 +620,7 @@ class Analyzer
|
||||
|
||||
list($base_class, $trait) = explode('&', $changed_member);
|
||||
|
||||
foreach ($all_referencing_methods as $member_id => $referencing_method_ids) {
|
||||
foreach ($all_referencing_methods as $member_id => $_) {
|
||||
if (strpos($member_id, $base_class . '::') !== 0) {
|
||||
continue;
|
||||
}
|
||||
@ -636,20 +634,6 @@ class Analyzer
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($all_referencing_methods as $member_id => $referencing_method_ids) {
|
||||
if (!strpos($member_id, '&')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$member_stub = $member_class_name . '::*';
|
||||
|
||||
if (!isset($all_referencing_methods[$member_stub])) {
|
||||
$all_referencing_methods[$member_stub] = $referencing_method_ids;
|
||||
} else {
|
||||
$all_referencing_methods[$member_stub] += $referencing_method_ids;
|
||||
}
|
||||
}
|
||||
|
||||
$newly_invalidated_methods = [];
|
||||
|
||||
foreach ($unchanged_signature_members as $file_unchanged_signature_members) {
|
||||
|
@ -288,16 +288,6 @@ class ClassLikes
|
||||
return $matching_classes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fq_class_name_lc
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasFullyQualifiedClassLikeName($fq_class_name_lc)
|
||||
{
|
||||
return isset($this->existing_classlikes_lc[$fq_class_name_lc]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $fq_class_name
|
||||
*
|
||||
|
@ -203,7 +203,7 @@ class ClassStatementsDiffer extends AstDiffer
|
||||
}
|
||||
} elseif ($diff_elem->old instanceof PhpParser\Node\Stmt\TraitUse) {
|
||||
foreach ($diff_elem->old->traits as $trait) {
|
||||
$keep[] = strtolower($name . '&' . $trait->getAttribute('resolvedName'));
|
||||
$keep[] = strtolower($name . '&' . (string) $trait->getAttribute('resolvedName'));
|
||||
}
|
||||
}
|
||||
} elseif ($diff_elem->type === DiffElem::TYPE_KEEP_SIGNATURE) {
|
||||
@ -229,7 +229,7 @@ class ClassStatementsDiffer extends AstDiffer
|
||||
}
|
||||
} elseif ($affected_elem instanceof PhpParser\Node\Stmt\TraitUse) {
|
||||
foreach ($affected_elem->traits as $trait) {
|
||||
$add_or_delete[] = strtolower($name . '&' . $trait->getAttribute('resolvedName'));
|
||||
$add_or_delete[] = strtolower($name . '&' . (string) $trait->getAttribute('resolvedName'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user