1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Merge pull request #10605 from edsrzf/php-parser-tweaks

This commit is contained in:
Bruce Weirdan 2024-01-30 18:52:27 -04:00 committed by GitHub
commit 04ba9358e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -157,7 +157,7 @@ class CodeLocation
$this->preview_start = $this->docblock_start ?: $this->file_start;
/** @psalm-suppress ImpureMethodCall Actually mutation-free just not marked */
$this->raw_line_number = $stmt->getLine();
$this->raw_line_number = $stmt->getStartLine();
$this->docblock_line_number = $comment_line;
}

View File

@ -1231,7 +1231,7 @@ final class ClassAnalyzer extends ClassLikeAnalyzer
$fake_stmt = new VirtualClassMethod(
new VirtualIdentifier('__construct'),
[
'type' => PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC,
'flags' => PhpParser\Node\Stmt\Class_::MODIFIER_PUBLIC,
'params' => $fake_constructor_params,
'stmts' => $fake_constructor_stmts,
],

View File

@ -546,7 +546,7 @@ final class ReflectorVisitor extends PhpParser\NodeVisitorAbstract implements Fi
}
throw new UnexpectedValueException(
'There should be function storages for line ' . $this->file_path . ':' . $node->getLine(),
'There should be function storages for line ' . $this->file_path . ':' . $node->getStartLine(),
);
}