@@ -83,26 +83,28 @@ public function getChanges(): array
8383 $ blocks [$ lastBlock ]['base ' ]['lines ' ] += $ formattedLines ;
8484 $ blocks [$ lastBlock ]['changed ' ]['lines ' ] += $ formattedLines ;
8585 }
86- } else {
87- if (
88- $ tag === SequenceMatcher::OPCODE_REPLACE ||
89- $ tag === SequenceMatcher::OPCODE_DELETE
90- ) {
91- $ lines = \array_slice ($ a , $ i1 , ($ i2 - $ i1 ));
92- $ lines = $ this ->formatLines ($ lines );
93- $ lines = \str_replace (static ::HTML_CLOSURES , static ::HTML_CLOSURES_DEL , $ lines );
94- $ blocks [$ lastBlock ]['base ' ]['lines ' ] += $ lines ;
95- }
9686
97- if (
98- $ tag === SequenceMatcher::OPCODE_REPLACE ||
99- $ tag === SequenceMatcher::OPCODE_INSERT
100- ) {
101- $ lines = \array_slice ($ b , $ j1 , ($ j2 - $ j1 ));
102- $ lines = $ this ->formatLines ($ lines );
103- $ lines = \str_replace (static ::HTML_CLOSURES , static ::HTML_CLOSURES_INS , $ lines );
104- $ blocks [$ lastBlock ]['changed ' ]['lines ' ] += $ lines ;
105- }
87+ continue ;
88+ }
89+
90+ if (
91+ $ tag === SequenceMatcher::OPCODE_REPLACE ||
92+ $ tag === SequenceMatcher::OPCODE_DELETE
93+ ) {
94+ $ lines = \array_slice ($ a , $ i1 , ($ i2 - $ i1 ));
95+ $ lines = $ this ->formatLines ($ lines );
96+ $ lines = \str_replace (static ::HTML_CLOSURES , static ::HTML_CLOSURES_DEL , $ lines );
97+ $ blocks [$ lastBlock ]['base ' ]['lines ' ] += $ lines ;
98+ }
99+
100+ if (
101+ $ tag === SequenceMatcher::OPCODE_REPLACE ||
102+ $ tag === SequenceMatcher::OPCODE_INSERT
103+ ) {
104+ $ lines = \array_slice ($ b , $ j1 , ($ j2 - $ j1 ));
105+ $ lines = $ this ->formatLines ($ lines );
106+ $ lines = \str_replace (static ::HTML_CLOSURES , static ::HTML_CLOSURES_INS , $ lines );
107+ $ blocks [$ lastBlock ]['changed ' ]['lines ' ] += $ lines ;
106108 }
107109 }
108110
0 commit comments