Code Duplication    Length = 9-9 lines in 2 locations

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

@@ 654-662 (lines=9) @@
651
        $s = $this->clamp_number($s, 0, 100) / 100;
652
        $l = $this->clamp_number($l, 0, 100) / 100;
653
654
        if ($s == 0) {
655
            $r = $g = $b = $this->round_number(255 * $l);
656
        } else {
657
            $v2 = $l < 0.5 ? $l * (1 + $s) : ($l + $s) - ($s * $l);
658
            $v1 = (2 * $l) - $v2;
659
            $r = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h + (1/3)));
660
            $g = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h));
661
            $b = $this->round_number(255 * $this->hue_to_rgb($v1, $v2, $h - (1/3)));
662
        }
663
664
        return $this->rgb_to_hex(array('', $r.','.$g.','.$b, $matches[2]));
665
    }

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

@@ 974-982 (lines=9) @@
971
        $s = $this->clampNumber($s, 0, 100) / 100;
972
        $l = $this->clampNumber($l, 0, 100) / 100;
973
974
        if ($s == 0) {
975
            $r = $g = $b = $this->roundNumber(255 * $l);
976
        } else {
977
            $v2 = $l < 0.5 ? $l * (1 + $s) : ($l + $s) - ($s * $l);
978
            $v1 = (2 * $l) - $v2;
979
            $r = $this->roundNumber(255 * $this->hueToRgb($v1, $v2, $h + (1/3)));
980
            $g = $this->roundNumber(255 * $this->hueToRgb($v1, $v2, $h));
981
            $b = $this->roundNumber(255 * $this->hueToRgb($v1, $v2, $h - (1/3)));
982
        }
983
984
        return array($r, $g, $b);
985
    }