diff --git a/src/Psalm/Internal/Analyzer/ClassAnalyzer.php b/src/Psalm/Internal/Analyzer/ClassAnalyzer.php index 137b47550..33b75aa39 100644 --- a/src/Psalm/Internal/Analyzer/ClassAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ClassAnalyzer.php @@ -362,16 +362,6 @@ class ClassAnalyzer extends ClassLikeAnalyzer 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); diff --git a/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php b/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php index 60491a78b..7ac07d41f 100644 --- a/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php @@ -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)