Code Duplication    Length = 5-5 lines in 2 locations

Contrib/less.php/Less.php 2 locations

@@ 4977-4981 (lines=5) @@
4974
		if( $max !== $min ){
4975
			$s = $l > 0.5 ? $d / (2 - $max - $min) : $d / ($max + $min);
4976
4977
			switch ($max) {
4978
				case $r: $h = ($g - $b) / $d + ($g < $b ? 6 : 0); break;
4979
				case $g: $h = ($b - $r) / $d + 2;				 break;
4980
				case $b: $h = ($r - $g) / $d + 4;				 break;
4981
			}
4982
			$h /= 6;
4983
		}
4984
		return array('h' => $h * 360, 's' => $s, 'l' => $l, 'a' => $a );
@@ 5008-5012 (lines=5) @@
5005
5006
		$h = 0;
5007
		if( $max !== $min ){
5008
			switch($max){
5009
				case $r: $h = ($g - $b) / $d + ($g < $b ? 6 : 0); break;
5010
				case $g: $h = ($b - $r) / $d + 2; break;
5011
				case $b: $h = ($r - $g) / $d + 4; break;
5012
			}
5013
			$h /= 6;
5014
		}
5015
		return array('h'=> $h * 360, 's'=> $s, 'v'=> $v, 'a' => $a );