Code Duplication    Length = 7-7 lines in 2 locations

src/SwiftTwigMailTemplate.php 2 locations

@@ 310-316 (lines=7) @@
307
308
        //begin removal
309
        /**///remove comment blocks
310
        while(stripos($s,'<!--') > 0){
311
            $pos[1] = stripos($s,'<!--');
312
            $pos[2] = stripos($s,'-->', $pos[1]);
313
            $len[1] = $pos[2] - $pos[1] + 3;
314
            $x = substr($s,$pos[1],$len[1]);
315
            $s = str_replace($x,'',$s);
316
        }
317
318
        /**///remove tags with content between them
319
        if(strlen($expand) > 0){
@@ 334-340 (lines=7) @@
331
        }
332
333
        /**///remove remaining tags
334
        while(stripos($s,'<') > 0){
335
            $pos[1] = stripos($s,'<');
336
            $pos[2] = stripos($s,'>', $pos[1]);
337
            $len[1] = $pos[2] - $pos[1] + 1;
338
            $x = substr($s,$pos[1],$len[1]);
339
            $s = str_replace($x,'',$s);
340
        }
341
342
        /**///finalize keep tag
343
        if (isset($k)) {