@@ -58,7 +58,7 @@ |
||
58 | 58 | * Simply triggers a E_USER_WARNING error with $message |
59 | 59 | * |
60 | 60 | * @param string $message The message describing the error |
61 | - * @return void |
|
61 | + * @return boolean |
|
62 | 62 | */ |
63 | 63 | protected static function trigger(string $message) { |
64 | 64 | return trigger_error($message, E_USER_WARNING); |
@@ -88,9 +88,9 @@ discard block |
||
88 | 88 | /** |
89 | 89 | * Convert a RGB array to a HSL array |
90 | 90 | * |
91 | - * @param float $r The red value (0 - 255) |
|
92 | - * @param float $g The green value (0 - 255) |
|
93 | - * @param float $b The blue value (0 - 255) |
|
91 | + * @param integer $r The red value (0 - 255) |
|
92 | + * @param integer $g The green value (0 - 255) |
|
93 | + * @param integer $b The blue value (0 - 255) |
|
94 | 94 | * @return array The resulting HSL array |
95 | 95 | */ |
96 | 96 | public static function rgb_to_hsl(int $r = 0, int $g = 0, int $b = 0, $accuracy = 2) :array { |
@@ -274,7 +274,6 @@ discard block |
||
274 | 274 | * |
275 | 275 | * @param float $h The hue value (0 - 360) |
276 | 276 | * @param float $s The saturation value (0 - 100) |
277 | - * @param float $b The brightness value (0 - 100) |
|
278 | 277 | * @return array The resulting RGB array |
279 | 278 | */ |
280 | 279 | public static function hsb_to_rgb(float $h = 0.0, float $s = 0.0, float $v = 0.0, int $accuracy = 3) :array { |
@@ -72,12 +72,12 @@ |
||
72 | 72 | /** |
73 | 73 | * Generate a random HSL color |
74 | 74 | * |
75 | - * @param int $min_r The min hue to allow |
|
76 | - * @param int $max_r The max hue to allow |
|
77 | - * @param int $min_g The min saturation to allow |
|
78 | - * @param int $max_g The max saturation to allow |
|
79 | - * @param int $min_b The min light to allow |
|
80 | - * @param int $max_b The max light to allow |
|
75 | + * @param int $min_h The min hue to allow |
|
76 | + * @param int $max_h The max hue to allow |
|
77 | + * @param int $min_h The min saturation to allow |
|
78 | + * @param int $max_h The max saturation to allow |
|
79 | + * @param int $min_h The min light to allow |
|
80 | + * @param int $max_h The max light to allow |
|
81 | 81 | * @return array The resulting color as a HSL array |
82 | 82 | */ |
83 | 83 | public static function hsl_rand(int $min_h = 0, int $max_h = 359, int $min_s = 0, int $max_s = 100, int $min_l = 0, int $max_l = 100) :array { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | * |
79 | 79 | * @param string $offset The offset to set |
80 | 80 | * @param mixed $value The value to set it to |
81 | - * @return mixed The result |
|
81 | + * @return double|null The result |
|
82 | 82 | */ |
83 | 83 | public function offsetSet($offset, $value) { |
84 | 84 | if ($this->offsetExists($offset)) { |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * Reset an offset to 0 |
96 | 96 | * |
97 | 97 | * @param string $offset The offset to unset |
98 | - * @return mixed The result |
|
98 | + * @return double|null The result |
|
99 | 99 | */ |
100 | 100 | public function offsetUnset($offset) { |
101 | 101 | if ($this->offsetExists($offset)) { |
@@ -51,6 +51,9 @@ |
||
51 | 51 | return $this->color->jsonSerialize(); |
52 | 52 | } |
53 | 53 | |
54 | + /** |
|
55 | + * @param scheme $scheme_class |
|
56 | + */ |
|
54 | 57 | protected function get_scheme(string $scheme_name, string $return_type = 'hex', $scheme_class) :array { |
55 | 58 | if (!is_null($cached = $this->cache->get(get_class($scheme_class).'_'.$scheme_name.'_'.$return_type, $this->hex()))) { |
56 | 59 | return $cached; |
@@ -58,7 +58,7 @@ |
||
58 | 58 | * Simply triggers a E_USER_WARNING error with $message |
59 | 59 | * |
60 | 60 | * @param string $message The message describing the error |
61 | - * @return void |
|
61 | + * @return boolean |
|
62 | 62 | */ |
63 | 63 | protected static function trigger(string $message) { |
64 | 64 | return trigger_error($message, E_USER_WARNING); |