Code Duplication    Length = 21-21 lines in 2 locations

classes/external/php/yui-php-cssmin-2.4.8-4_fgo.php 1 location

@@ 566-586 (lines=21) @@
563
     * ---------------------------------------------------------------------------------------------
564
     */
565
566
    private function replace_string($matches)
567
    {
568
        $match = $matches[0];
569
        $quote = substr($match, 0, 1);
570
        // Must use addcslashes in PHP to avoid parsing of backslashes
571
        $match = addcslashes($this->str_slice($match, 1, -1), '\\');
572
573
        // maybe the string contains a comment-like substring?
574
        // one, maybe more? put'em back then
575
        if (($pos = $this->index_of($match, self::COMMENT)) >= 0) {
576
            for ($i = 0, $max = count($this->comments); $i < $max; $i++) {
577
                $match = preg_replace('/' . self::COMMENT . $i . '___/', $this->comments[$i], $match, 1);
578
            }
579
        }
580
581
        // minify alpha opacity in filter strings
582
        $match = preg_replace('/progid\:DXImageTransform\.Microsoft\.Alpha\(Opacity\=/i', 'alpha(opacity=', $match);
583
584
        $this->preserved_tokens[] = $match;
585
        return $quote . self::TOKEN . (count($this->preserved_tokens) - 1) . '___' . $quote;
586
    }
587
588
    private function replace_colon($matches)
589
    {

classes/external/php/yui-php-cssmin-2.4.8-p9.php 1 location

@@ 573-593 (lines=21) @@
570
        return preg_replace('/\s+/', '', $matches[0]);
571
    }
572
573
    private function replace_string($matches)
574
    {
575
        $match = $matches[0];
576
        $quote = substr($match, 0, 1);
577
        // Must use addcslashes in PHP to avoid parsing of backslashes
578
        $match = addcslashes($this->str_slice($match, 1, -1), '\\');
579
580
        // maybe the string contains a comment-like substring?
581
        // one, maybe more? put'em back then
582
        if (($pos = $this->index_of($match, self::COMMENT)) >= 0) {
583
            for ($i = 0, $max = count($this->comments); $i < $max; $i++) {
584
                $match = preg_replace('/' . self::COMMENT . $i . '___/', $this->comments[$i], $match, 1);
585
            }
586
        }
587
588
        // minify alpha opacity in filter strings
589
        $match = preg_replace('/progid\:DXImageTransform\.Microsoft\.Alpha\(Opacity\=/i', 'alpha(opacity=', $match);
590
591
        $this->preserved_tokens[] = $match;
592
        return $quote . self::TOKEN . (count($this->preserved_tokens) - 1) . '___' . $quote;
593
    }
594
595
    private function replace_colon($matches)
596
    {