Skip to content

Commit 3c6a671

Browse files
committed
refactor line numbers
1 parent 24bfa8c commit 3c6a671

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Understand/UnderstandLaravel5/ExceptionEncoder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ public function getCode($relativePath, $line, $linesAround = 6)
187187
{
188188
$file->next();
189189
// `key()` returns 0 as the first line
190-
$codeLines[$file->key() + 1] = rtrim($file->current());
190+
$codeLines[] = [
191+
'line' => $file->key() + 1,
192+
'code' => rtrim($file->current())
193+
];
191194
}
192195

193196
return $codeLines;

0 commit comments

Comments
 (0)