From 0e033b1fbeeb041d4d693b750e0e30cd7a718dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20L=C3=BCcke?= Date: Tue, 23 Mar 2021 16:13:30 +0100 Subject: [PATCH] =?UTF-8?q?Nutzung=20der=20Methode=20'intdiv'=20nach=20Hin?= =?UTF-8?q?weisen=20von=20*PhpStan*=20=C3=BCberdacht.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Utilities/HueSaturationValueToCyanMagentaYellowKey.php | 4 ++-- .../Utilities/HueSaturationValueToRedGreenBlue.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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;