clean-code #4
@@ -8,7 +8,7 @@ use InvalidArgumentException;
|
||||
abstract class AbstractColorModel
|
||||
{
|
||||
|
||||
protected function checkValue(float $value)
|
||||
protected function checkValue(float $value): void
|
||||
{
|
||||
if ($value > 1.0) {
|
||||
throw new InvalidArgumentException('Ein Wert größer als 1 ist nicht definierbar.');
|
||||
|
||||
@@ -44,6 +44,11 @@ abstract class AbstractHueSaturationValueToUtility
|
||||
|
||||
abstract protected function splitColor(): void;
|
||||
|
||||
/**
|
||||
* @param bool $reciprocal
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
protected function calcColorValue($reciprocal = false): float
|
||||
{
|
||||
// Rest-Anteil am Vollkreis des aktuellen Intervals als Wert '[0,1]'
|
||||
|
||||
Reference in New Issue
Block a user