Skip to content

Commit f8bdf5e

Browse files
committed
add getLineNumber() method
1 parent 59b86ca commit f8bdf5e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Code/CodeSnippet.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ public function getCode(): array
7272
return $this->code;
7373
}
7474

75+
public function getLineNumber(): int
76+
{
77+
return $this->surroundingLine;
78+
}
79+
7580
protected function getBounds(int $totalNumberOfLineInFile): array
7681
{
7782
$startLine = max($this->surroundingLine - floor($this->snippetLineCount / 2), 1);

0 commit comments

Comments
 (0)