Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove always-empty ClassAnalyzer leftover_stmts array #9522

Merged
merged 1 commit into from Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/Psalm/Internal/Analyzer/ClassAnalyzer.php
Expand Up @@ -362,16 +362,6 @@ public function analyze(
return;
}

if ($this->leftover_stmts) {
(new StatementsAnalyzer(
$this,
new NodeDataProvider(),
))->analyze(
$this->leftover_stmts,
$class_context,
);
}

if (!$storage->abstract) {
foreach ($storage->declaring_method_ids as $declaring_method_id) {
$method_storage = $codebase->methods->getStorage($declaring_method_id);
Expand Down
5 changes: 0 additions & 5 deletions src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php
Expand Up @@ -92,11 +92,6 @@ abstract class ClassLikeAnalyzer extends SourceAnalyzer
*/
protected ?string $parent_fq_class_name = null;

/**
* @var PhpParser\Node\Stmt[]
*/
protected array $leftover_stmts = [];

protected ClassLikeStorage $storage;

public function __construct(PhpParser\Node\Stmt\ClassLike $class, SourceAnalyzer $source, string $fq_class_name)
Expand Down