This repository was archived by the owner on Jul 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function getUnifiedDiff(int $context = 3): string {
5858 $run_start = null ;
5959 for ($i = $context ; $i < $count ; ++ $i ) {
6060 if ($remaining [$i ] instanceof DiffKeepOp ) {
61- $run_start = $run_start ?? $i ;
61+ $run_start ?? = $i ;
6262 continue ;
6363 }
6464
@@ -99,25 +99,25 @@ private function getUnifiedDiffHunk(
9999 foreach ($hunk as $op ) {
100100 if ($op instanceof DiffKeepOp ) {
101101 $lines [] = ' ' . $op -> getContent();
102- $old_start = $old_start ?? $op -> getOldPos();
103- $new_start = $new_start ?? $op -> getNewPos();
102+ $old_start ?? = $op -> getOldPos();
103+ $new_start ?? = $op -> getNewPos();
104104 ++ $old_lines ;
105105 ++ $new_lines ;
106106 continue ;
107107 }
108108
109109 if ($op instanceof DiffDeleteOp ) {
110110 $lines [] = ' -' . $op -> getContent();
111- $old_start = $old_start ?? $op -> getOldPos();
112- $new_start = $new_start ?? $op -> getOldPos();
111+ $old_start ?? = $op -> getOldPos();
112+ $new_start ?? = $op -> getOldPos();
113113 ++ $old_lines ;
114114 continue ;
115115 }
116116
117117 if ($op instanceof DiffInsertOp ) {
118118 $lines [] = ' +' . $op -> getContent();
119- $old_start = $old_start ?? $op -> getNewPos();
120- $new_start = $new_start ?? $op -> getNewPos();
119+ $old_start ?? = $op -> getNewPos();
120+ $new_start ?? = $op -> getNewPos();
121121 ++ $new_lines ;
122122 continue ;
123123 }
You can’t perform that action at this time.
0 commit comments