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:
commit
04ba9358e3
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
],
|
||||
|
@ -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(),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user