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
226
226
*
227
227
* @param string[] $lines the array of lines
228
228
* @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 .
230
230
*
231
231
* @return string[] array of all of the lines between the specified range
232
232
*/
233
233
private function getText (array $ lines , int $ start = 0 , ?int $ end = null ): array
234
234
{
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 );
238
236
}
239
237
}
You can’t perform that action at this time.
0 commit comments