| 1 | <?php |
||
| 3 | trait Convert { |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Converts red-green-blue(RGB) to hexadecimal |
||
| 7 | * |
||
| 8 | * @param array $rgb RGB color |
||
| 9 | * @return string Hexadecimal color |
||
| 10 | */ |
||
| 11 | public static function rgbhex($rgb) { |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Converts hexadecimal to red-green-blue(RGB) |
||
| 21 | * |
||
| 22 | * @param string $hex Hexadecimal color |
||
| 23 | * @return array RGB color |
||
|
|
|||
| 24 | */ |
||
| 25 | function hexrgb($hex) { |
||
| 44 | /** |
||
| 45 | * Converts hexadecimal to red-green-blue(RGB) |
||
| 46 | * |
||
| 47 | * @param array $arrayRGB RGB color |
||
| 48 | * @param array $arrayRGB2 RGB color |
||
| 49 | * @return array Blended RGB color |
||
| 50 | */ |
||
| 51 | function colorBlend($arrayRGB,$arrayRGB2) { |
||
| 61 | |||
| 62 | } |
||
| 63 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.