@@ -14,10 +14,16 @@ discard block |
||
| 14 | 14 | */ |
| 15 | 15 | trait converter { |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $message |
|
| 19 | + */ |
|
| 17 | 20 | protected static function error($message) { |
| 18 | 21 | return \projectcleverweb\color\error::call($message); |
| 19 | 22 | } |
| 20 | 23 | |
| 24 | + /** |
|
| 25 | + * @return double |
|
| 26 | + */ |
|
| 21 | 27 | protected static function _validate_array_input($input) { |
| 22 | 28 | if (!is_array($input)) { |
| 23 | 29 | static::error(sprintf( |
@@ -43,6 +49,9 @@ discard block |
||
| 43 | 49 | return $array; |
| 44 | 50 | } |
| 45 | 51 | |
| 52 | + /** |
|
| 53 | + * @return string |
|
| 54 | + */ |
|
| 46 | 55 | public static function _validate_hex_input($input) { |
| 47 | 56 | if (is_int($input)) { |
| 48 | 57 | return str_pad(dechex($input % 16777216), 6, '0', STR_PAD_LEFT); |