Nutzung der Methode 'intdiv' nach Hinweisen von *PhpStan* überdacht.

This commit is contained in:
2021-03-23 16:13:30 +01:00
parent 6a26eb4608
commit 0e033b1fbe
2 changed files with 5 additions and 5 deletions
@@ -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;
@@ -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;