diff --git a/src/Transformer/Utilities/HueSaturationValueToCyanMagentaYellowKey.php b/src/Transformer/Utilities/HueSaturationValueToCyanMagentaYellowKey.php index bfced30..c66e963 100644 --- a/src/Transformer/Utilities/HueSaturationValueToCyanMagentaYellowKey.php +++ b/src/Transformer/Utilities/HueSaturationValueToCyanMagentaYellowKey.php @@ -39,9 +39,9 @@ class HueSaturationValueToCyanMagentaYellowKey extends AbstractHueSaturationValu protected function splitColor(): void { // ID des zu nutzenden Interval - $interval_id = intdiv($this->hueAsPercentGrad , self::INTERVAL); + $interval_id = $this->hueAsPercentGrad / self::INTERVAL; - switch ($interval_id) { + switch ((int)$interval_id) { case 1: // Yellow $this->cyan = $this->calcColorValue(); $this->yellow = $this->saturation; diff --git a/src/Transformer/Utilities/HueSaturationValueToRedGreenBlue.php b/src/Transformer/Utilities/HueSaturationValueToRedGreenBlue.php index 30b473d..3520d92 100644 --- a/src/Transformer/Utilities/HueSaturationValueToRedGreenBlue.php +++ b/src/Transformer/Utilities/HueSaturationValueToRedGreenBlue.php @@ -36,11 +36,11 @@ class HueSaturationValueToRedGreenBlue extends AbstractHueSaturationValueToUtili protected function splitColor(): void { // ID des zu nutzenden Interval - $interval_id = intdiv($this->hueAsPercentGrad , self::INTERVAL); + $interval_id = $this->hueAsPercentGrad / self::INTERVAL; // Ist der Wert der entgegen gesetzten Farbe. $opposite_color_value = $this->value * ( 1 - $this->saturation); - - switch ($interval_id) { + + switch ((int)$interval_id) { case 1: $this->red = $this->calcColorValue(); $this->blue = $opposite_color_value;