Conditions | 3 |
Paths | 1 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | public static function isValidHsl(float $hue, float $saturation, float $lightness) : bool |
||
44 | { |
||
45 | // Check to see the values are between 0 and 1 and return false if any are outside the bounds |
||
46 | 3 | return array_reduce([$hue, $saturation, $lightness], function ($carry, $color) { |
|
47 | 3 | return $color >= 0 && $color <= 1 && $carry === true; |
|
48 | 3 | }, true); |
|
49 | } |
||
63 |