Skip to content

Commit

Permalink
Remove usages of deprecated getLine
Browse files Browse the repository at this point in the history
  • Loading branch information
edsrzf committed Jan 28, 2024
1 parent 361ba65 commit f1a206f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/CodeLocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function __construct(
$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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/PhpVisitor/ReflectorVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public function leaveNode(PhpParser\Node $node)
}

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(),
);
}

Expand Down

0 comments on commit f1a206f

Please sign in to comment.