Code Duplication    Length = 4-8 lines in 2 locations

lib/Caxy/HtmlDiff/HtmlDiff.php 2 locations

@@ 162-169 (lines=8) @@
159
            $openIsolatedDiffTag = $this->isOpeningIsolatedDiffTag($word, $currentIsolatedDiffTag);
160
            if ($openIsolatedDiffTag) {
161
                if ($this->isSelfClosingTag($word) || $this->stringUtil->stripos($word, '<img') !== false) {
162
                    if ($openIsolatedDiffTags === 0) {
163
                        $isolatedDiffTagIndices[] = array(
164
                            'start' => $index,
165
                            'length' => 1,
166
                            'tagType' => $openIsolatedDiffTag,
167
                        );
168
                        $currentIsolatedDiffTag = null;
169
                    }
170
                } else {
171
                    if ($openIsolatedDiffTags === 0) {
172
                        $isolatedDiffTagStart = $index;
@@ 179-182 (lines=4) @@
176
                }
177
            } elseif ($openIsolatedDiffTags > 0 && $this->isClosingIsolatedDiffTag($word, $currentIsolatedDiffTag)) {
178
                --$openIsolatedDiffTags;
179
                if ($openIsolatedDiffTags == 0) {
180
                    $isolatedDiffTagIndices[] = array('start' => $isolatedDiffTagStart, 'length' => $index - $isolatedDiffTagStart + 1, 'tagType' => $currentIsolatedDiffTag);
181
                    $currentIsolatedDiffTag = null;
182
                }
183
            }
184
        }
185
        $isolatedDiffTagScript = array();