22
33namespace Caxy \HtmlDiff ;
44
5- use Caxy \HtmlDiff \Table \TableDiff ;
6-
75class HtmlDiff extends AbstractDiff
86{
97 protected $ wordIndices ;
@@ -60,13 +58,13 @@ protected function indexNewWords()
6058 }
6159 }
6260
63- private function replaceIsolatedDiffTags ()
61+ protected function replaceIsolatedDiffTags ()
6462 {
6563 $ this ->oldIsolatedDiffTags = $ this ->createIsolatedDiffTagPlaceholders ($ this ->oldWords );
6664 $ this ->newIsolatedDiffTags = $ this ->createIsolatedDiffTagPlaceholders ($ this ->newWords );
6765 }
6866
69- private function createIsolatedDiffTagPlaceholders (&$ words )
67+ protected function createIsolatedDiffTagPlaceholders (&$ words )
7068 {
7169 $ openIsolatedDiffTags = 0 ;
7270 $ isolatedDiffTagIndicies = array ();
@@ -101,7 +99,7 @@ private function createIsolatedDiffTagPlaceholders(&$words)
10199
102100 }
103101
104- private function isOpeningIsolatedDiffTag ($ item , $ currentIsolatedDiffTag = null )
102+ protected function isOpeningIsolatedDiffTag ($ item , $ currentIsolatedDiffTag = null )
105103 {
106104 $ tagsToMatch = $ currentIsolatedDiffTag !== null ? array ($ currentIsolatedDiffTag => $ this ->isolatedDiffTags [$ currentIsolatedDiffTag ]) : $ this ->isolatedDiffTags ;
107105 foreach ($ tagsToMatch as $ key => $ value ) {
@@ -112,7 +110,7 @@ private function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null)
112110 return false ;
113111 }
114112
115- private function isClosingIsolatedDiffTag ($ item , $ currentIsolatedDiffTag = null )
113+ protected function isClosingIsolatedDiffTag ($ item , $ currentIsolatedDiffTag = null )
116114 {
117115 $ tagsToMatch = $ currentIsolatedDiffTag !== null ? array ($ currentIsolatedDiffTag => $ this ->isolatedDiffTags [$ currentIsolatedDiffTag ]) : $ this ->isolatedDiffTags ;
118116 foreach ($ tagsToMatch as $ key => $ value ) {
@@ -143,7 +141,7 @@ protected function performOperation($operation)
143141 }
144142 }
145143
146- private function processReplaceOperation ($ operation )
144+ protected function processReplaceOperation ($ operation )
147145 {
148146 $ this ->processDeleteOperation ( $ operation , "diffmod " );
149147 $ this ->processInsertOperation ( $ operation , "diffmod " );
@@ -183,7 +181,7 @@ protected function processDeleteOperation($operation, $cssClass)
183181 $ this ->insertTag ( "del " , $ cssClass , $ text );
184182 }
185183
186- private function diffElements ($ oldText , $ newText )
184+ protected function diffElements ($ oldText , $ newText )
187185 {
188186 $ pattern = '/(^<[^>]+>)|(<\/[^>]+>$)/i ' ;
189187 $ matches = array ();
@@ -217,7 +215,7 @@ protected function processEqualOperation($operation)
217215 $ this ->content .= implode ( "" , $ result );
218216 }
219217
220- private function findIsolatedDiffTagsInOld ($ operation , $ posInNew )
218+ protected function findIsolatedDiffTagsInOld ($ operation , $ posInNew )
221219 {
222220 $ offset = $ posInNew - $ operation ->startInNew ;
223221
0 commit comments