Code Duplication    Length = 13-13 lines in 2 locations

lib/Caxy/HtmlDiff/HtmlDiff.php 2 locations

@@ 173-185 (lines=13) @@
170
     *
171
     * @return false|string
172
     */
173
    protected function isOpeningIsolatedDiffTag($item, $currentIsolatedDiffTag = null)
174
    {
175
        $tagsToMatch = $currentIsolatedDiffTag !== null
176
            ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag))
177
            : $this->config->getIsolatedDiffTags();
178
        foreach ($tagsToMatch as $key => $value) {
179
            if (preg_match("#<".$key."[^>]*>\\s*#iU", $item)) {
180
                return $key;
181
            }
182
        }
183
184
        return false;
185
    }
186
187
    /**
188
     * @param string      $item
@@ 193-205 (lines=13) @@
190
     *
191
     * @return false|string
192
     */
193
    protected function isClosingIsolatedDiffTag($item, $currentIsolatedDiffTag = null)
194
    {
195
        $tagsToMatch = $currentIsolatedDiffTag !== null
196
            ? array($currentIsolatedDiffTag => $this->config->getIsolatedDiffTagPlaceholder($currentIsolatedDiffTag))
197
            : $this->config->getIsolatedDiffTags();
198
        foreach ($tagsToMatch as $key => $value) {
199
            if (preg_match("#</".$key."[^>]*>\\s*#iU", $item)) {
200
                return $key;
201
            }
202
        }
203
204
        return false;
205
    }
206
207
    /**
208
     * @param Operation $operation