@@ -158,7 +158,7 @@ protected function createIsolatedDiffTagPlaceholders(&$words)
158158 foreach  ($ wordsas  $ index$ word
159159 $ openIsolatedDiffTag$ this isOpeningIsolatedDiffTag ($ word$ currentIsolatedDiffTag
160160 if  ($ openIsolatedDiffTag
161-  if  ($ this isSelfClosingTag ($ wordmb_stripos ($ word'<img ' ) !== false ) {
161+  if  ($ this isSelfClosingTag ($ word$ this -> stringUtil -> stripos ($ word'<img ' ) !== false ) {
162162 if  ($ openIsolatedDiffTags0 ) {
163163 $ isolatedDiffTagIndicesarray (
164164 'start '  => $ index
@@ -543,7 +543,7 @@ protected function insertTag($tag, $cssClass, &$words)
543543 $ specialCaseTagInjection'' ;
544544 $ specialCaseTagInjectionIsBeforefalse ;
545545
546-  if  (count ($ nonTags0 ) {
546+  if  (count ($ nonTags=  0 ) {
547547 $ text$ this wrapText (implode ('' , $ nonTags$ tag$ cssClass
548548 $ this content  .= $ text
549549 } else  {
@@ -567,15 +567,15 @@ protected function insertTag($tag, $cssClass, &$words)
567567 }
568568 }
569569 }
570-  if  (count ($ words0  && mb_strlen ($ specialCaseTagInjection0 ) {
570+  if  (count ($ words0  && $ this -> stringUtil -> strlen ($ specialCaseTagInjection0 ) {
571571 break ;
572572 }
573573 if  ($ specialCaseTagInjectionIsBefore
574574 $ this content  .= $ specialCaseTagInjectionimplode ('' , $ this extractConsecutiveWords ($ words'tag ' ));
575575 } else  {
576576 $ workTag$ this extractConsecutiveWords ($ words'tag ' );
577577 if  (isset ($ workTag0  ]) && $ this isOpeningTag ($ workTag0  ]) && !$ this isClosingTag ($ workTag0  ])) {
578-  if  (mb_strpos ($ workTag0  ], 'class= ' )) {
578+  if  ($ this -> stringUtil -> strpos ($ workTag0  ], 'class= ' )) {
579579 $ workTag0  ] = str_replace ('class=" ' , 'class="diffmod  ' , $ workTag0  ]);
580580 $ workTag0  ] = str_replace ("class=' " , 'class="diffmod  ' , $ workTag0  ]);
581581 } else  {
@@ -584,7 +584,7 @@ protected function insertTag($tag, $cssClass, &$words)
584584 }
585585
586586 $ appendContentimplode ('' , $ workTag$ specialCaseTagInjection
587-  if  (isset ($ workTag0 ]) && false  !== mb_stripos ($ workTag0 ], '<img ' )) {
587+  if  (isset ($ workTag0 ]) && false  !== $ this -> stringUtil -> stripos ($ workTag0 ], '<img ' )) {
588588 $ appendContent$ this wrapText ($ appendContent$ tag$ cssClass
589589 }
590590 $ this content  .= $ appendContent
@@ -698,7 +698,7 @@ protected function operations()
698698 $ matches$ this matchingBlocks ();
699699 $ matchesnew  Match (count ($ this oldWords ), count ($ this newWords ), 0 );
700700
701-  foreach  ($ matchesas  $ i  =>  $ match
701+  foreach  ($ matchesas  $ match
702702 $ matchStartsAtCurrentPositionInOld$ positionInOld$ matchstartInOld );
703703 $ matchStartsAtCurrentPositionInNew$ positionInNew$ matchstartInNew );
704704
@@ -769,10 +769,10 @@ protected function findMatchingBlocks($startInOld, $endInOld, $startInNew, $endI
769769 */ 
770770 protected  function  stripTagAttributes ($ word
771771 {
772-  $ spacemb_strpos ($ word'  ' , 1 );
772+  $ space$ this -> stringUtil -> strpos ($ word'  ' , 1 );
773773
774774 if  ($ space
775-  return  '< '  . mb_substr ($ word1 , $ space'> ' ;
775+  return  '< '  . $ this -> stringUtil -> substr ($ word1 , $ space'> ' ;
776776 }
777777
778778 return  trim ($ word'<> ' );
@@ -788,6 +788,7 @@ protected function stripTagAttributes($word)
788788 */ 
789789 protected  function  findMatch ($ startInOld$ endInOld$ startInNew$ endInNew
790790 {
791+  $ groupDiffs$ this isGroupDiffs ();
791792 $ bestMatchInOld$ startInOld
792793 $ bestMatchInNew$ startInNew
793794 $ bestMatchSize0 ;
@@ -816,7 +817,7 @@ protected function findMatch($startInOld, $endInOld, $startInNew, $endInNew)
816817
817818 if  ($ newMatchLength$ bestMatchSize
818819 (
819-  $ this -> isGroupDiffs ()  &&
820+  $ groupDiffs 
820821 $ bestMatchSize0  &&
821822 $ this isOnlyWhitespace ($ this array_slice_cached ($ this oldWords , $ bestMatchInOld$ bestMatchSize
822823 )
@@ -830,9 +831,9 @@ protected function findMatch($startInOld, $endInOld, $startInNew, $endInNew)
830831 }
831832
832833 // Skip match if none found or match consists only of whitespace 
833-  if  ($ bestMatchSize0  &&
834+  if  ($ bestMatchSize=  0  &&
834835 (
835-  !$ this -> isGroupDiffs ()  ||
836+  !$ groupDiffs 
836837 !$ this isOnlyWhitespace ($ this array_slice_cached ($ this oldWords , $ bestMatchInOld$ bestMatchSize
837838 )
838839 ) {
@@ -850,7 +851,7 @@ protected function findMatch($startInOld, $endInOld, $startInNew, $endInNew)
850851 protected  function  isOnlyWhitespace ($ str
851852 {
852853 // Slightly faster then using preg_match 
853-  return  $ str''  && ( mb_strlen ( trim ($ str)  === 0 ) ;
854+  return  $ str''  && trim ($ str'' ;
854855 }
855856
856857 /** 
0 commit comments