stmts as $stmt) { if ($stmt instanceof Stmt\Property) { array_push($methods, ...PropertyHookLowering::lowerProperty($stmt)); } elseif ($stmt instanceof Stmt\ClassMethod && $stmt->name->toLowerString() === '__construct') { foreach ($stmt->params as $param) { $marker = PropertyHookLowering::lowerPromotedProperty($param); if ($marker !== null) { $methods[] = $marker; } } } } if ($methods !== []) { array_push($node->stmts, ...$methods); } return null; } }