mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 19:59:11 +00:00
Color: make mix() first parameter mandatory, closes #3204
This commit is contained in:
@@ -79,15 +79,14 @@ final class Color{
|
||||
/**
|
||||
* Mixes the supplied list of colours together to produce a result colour.
|
||||
*
|
||||
* @param Color $color1
|
||||
* @param Color ...$colors
|
||||
*
|
||||
* @return Color
|
||||
*/
|
||||
public static function mix(Color ...$colors) : Color{
|
||||
public static function mix(Color $color1, Color ...$colors) : Color{
|
||||
$colors[] = $color1;
|
||||
$count = count($colors);
|
||||
if($count < 1){
|
||||
throw new \ArgumentCountError("No colors given");
|
||||
}
|
||||
|
||||
$a = $r = $g = $b = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user