Code Duplication    Length = 7-7 lines in 2 locations

src/convert.php 1 location

@@ 115-121 (lines=7) @@
112
		$s     = 0;
113
		$l     = ($max + $min) / 2;
114
		
115
		if ($max != $min) {
116
			$s = $delta / ($max + $min);
117
			if ($l >= 0.5) {
118
				$s = $delta / (2 - $max - $min);
119
			}
120
			static::_rgbhsl_hue($h, $r, $g, $b, $max, $delta);
121
		}
122
		
123
		return [
124
			'h' => round($h * 360, $accuracy),

src/convert/rgb.php 1 location

@@ 62-68 (lines=7) @@
59
		$s     = 0;
60
		$l     = ($max + $min) / 2;
61
		
62
		if ($max != $min) {
63
			$s = $delta / ($max + $min);
64
			if ($l >= 0.5) {
65
				$s = $delta / (2 - $max - $min);
66
			}
67
			static::_rgbhsl_hue($h, $r, $g, $b, $max, $delta);
68
		}
69
		
70
		return [
71
			'h' => $h * 360,