Code Duplication    Length = 7-7 lines in 2 locations

src/convert.php 1 location

@@ 62-68 (lines=7) @@
59
		];
60
	}
61
	
62
	public static function rgb_contrast(int $r = 0, int $g = 0, int $b = 0) :array {
63
		return [
64
			'r' => ($r < 128) ? 255 : 0,
65
			'g' => ($g < 128) ? 255 : 0,
66
			'b' => ($b < 128) ? 255 : 0
67
		];
68
	}
69
	
70
	public static function rgb_to_hsl(int $r = 0, int $g = 0, int $b = 0, $accuracy = 2) :array {
71
		$r    /= 255;

src/generate.php 1 location

@@ 9-15 (lines=7) @@
6
7
class generate {
8
	
9
	public static function rgb_contrast(int $r = 0, int $g = 0, int $b = 0) :array {
10
		return [
11
			'r' => ($r < 128) ? 255 : 0,
12
			'g' => ($g < 128) ? 255 : 0,
13
			'b' => ($b < 128) ? 255 : 0
14
		];
15
	}
16
	
17
	public static function rgb_invert(int $r = 0, int $g = 0, int $b = 0) :array {
18
		return [