File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -226,14 +226,12 @@ public function render(AbstractRenderer $renderer): string
226226 *
227227 * @param string[] $lines the array of lines
228228 * @param int $start the starting number
229- * @param null|int $end the ending number. If not supplied, only the item in $start will be returned .
229+ * @param null|int $end the ending number. If not supplied, only the item in $start will be sliced .
230230 *
231231 * @return string[] array of all of the lines between the specified range
232232 */
233233 private function getText (array $ lines , int $ start = 0 , ?int $ end = null ): array
234234 {
235- return $ start === 0 && (!isset ($ end ) || $ end === \count ($ lines ))
236- ? $ lines
237- : \array_slice ($ lines , $ start , isset ($ end ) ? $ end - $ start : 1 );
235+ return \array_slice ($ lines , $ start , ($ end ?? $ start + 1 ) - $ start );
238236 }
239237}
You can’t perform that action at this time.
0 commit comments