Code Duplication    Length = 7-7 lines in 2 locations

src/SwiftTwigMailTemplate.php 2 locations

@@ 301-307 (lines=7) @@
298
299
        //begin removal
300
        /**///remove comment blocks
301
        while(stripos($s,'<!--') > 0){
302
            $pos[1] = stripos($s,'<!--');
303
            $pos[2] = stripos($s,'-->', $pos[1]);
304
            $len[1] = $pos[2] - $pos[1] + 3;
305
            $x = substr($s,$pos[1],$len[1]);
306
            $s = str_replace($x,'',$s);
307
        }
308
309
        /**///remove tags with content between them
310
        if(strlen($expand) > 0){
@@ 325-331 (lines=7) @@
322
        }
323
324
        /**///remove remaining tags
325
        while(stripos($s,'<') > 0){
326
            $pos[1] = stripos($s,'<');
327
            $pos[2] = stripos($s,'>', $pos[1]);
328
            $len[1] = $pos[2] - $pos[1] + 1;
329
            $x = substr($s,$pos[1],$len[1]);
330
            $s = str_replace($x,'',$s);
331
        }
332
333
        /**///finalize keep tag
334
        if (isset($k)) {