Skip to content

Commit c26360f

Browse files
committed
add getLineNumbers method
1 parent 52ce7bc commit c26360f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CodeSnippet.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public function getLineNumberEnd(): int
142142
return $this->surroundingLines[count($this->surroundingLines) - 1] ?? 0;
143143
}
144144

145+
public function getLineNumbers(): array
146+
{
147+
return array_keys($this->getLines());
148+
}
149+
145150
public function toString()
146151
{
147152
$result = '';

0 commit comments

Comments
 (0)