refactor: Texte überarbeiten

This commit is contained in:
2022-03-04 19:33:25 +01:00
parent bd9eac43b2
commit c9540dc126
17 changed files with 47 additions and 47 deletions
+3 -3
View File
@@ -9,11 +9,11 @@ namespace TorstenHettstedt\Colors\ColorModels;
*/
class CyanMagentaYellowKey extends AbstractColorModel
{
/** @var float : Definition des Cyan-Anteil */
/** @var float : Definition des Cyan-Anteils */
protected float $cyan = 0.0;
/** @var float : Definition des Magenta-Anteil */
/** @var float : Definition des Magenta-Anteils */
protected float $magenta = 0.0;
/** @var float : Definition des Gelbanteil */
/** @var float : Definition des Gelbanteiles */
protected float $yellow = 0.0;
/** @var float : Definition des Schwarzanteil */
protected float $key = 0.0;
+1 -1
View File
@@ -9,7 +9,7 @@ namespace TorstenHettstedt\Colors\ColorModels;
*/
class HueSaturationValue extends AbstractColorModel
{
/** @var float : Definition des Farbton als Anteil eines Vollkreises '$Hue * π' */
/** @var float : Definition des Farbtones als Anteil eines Vollkreises '$Hue * π' */
protected float $hue = 0.0;
/** @var float : Definition der Sättigung der Farbe */
protected float $saturation = 0.0;
+3 -3
View File
@@ -8,11 +8,11 @@ namespace TorstenHettstedt\Colors\ColorModels;
*/
class RedGreenBlue extends AbstractColorModel
{
/** @var float : Definition des Rotanteil */
/** @var float : Definition des Rot-Anteils */
protected float $red = 1.0;
/** @var float : Definition des Grünanteil */
/** @var float : Definition des Grün-Anteils */
protected float $green = 1.0;
/** @var float : Definition des Grünanteil */
/** @var float : Definition des Blau-Anteils */
protected float $blue = 1.0;
/**
+2 -2
View File
@@ -70,7 +70,7 @@ class RedGreenBlue
/**
* @return int
*/
public function getBlue(): int
#[Pure] public function getBlue(): int
{
return $this->hexadecimalValuesHelper->asHexadecimalValue($this->pureColor->getBlue());
}
@@ -86,7 +86,7 @@ class RedGreenBlue
return $this;
}
public function asHtmlNotation(): string
#[Pure] public function asHtmlNotation(): string
{
return sprintf('#%X%X%X', $this->getRed(), $this->getGreen(), $this->getBlue());
}
@@ -8,11 +8,11 @@ use TorstenHettstedt\Colors\ColorModels\HueSaturationValue;
abstract class AbstractHueSaturationValueToUtility
{
/** @var int : Größe des Intervals in 1/100 Grad */
/** @var float : Größe des Intervals in 1/100 Grad */
protected const INTERVAL = 60.0 * 100.0;
// Daten für HSV
/** @var float : Definition des Farbton als Anteil eines Vollkreises '$Hue * π' */
/** @var float : Definition des Farbtones als Anteil eines Vollkreises '$Hue * π' */
protected float $hue;
/** @var float : Anteil am Vollkreis in 1/100 Grad */
protected float $hueAsPercentGrad;
@@ -15,11 +15,11 @@ class CyanMagentaYellowKeyToHueSaturationValue
const PROPERTY_KEY = 'key';
// Daten für CMYK
/** @var float : Definition des Cyan-Anteil */
/** @var float : Definition des Cyan-Anteils */
protected float $cyan;
/** @var float : Definition des Magenta-Anteil */
/** @var float : Definition des Magenta-Anteils */
protected float $magenta;
/** @var float : Definition des Gelbanteil */
/** @var float : Definition des Gelbanteils */
protected float $yellow;
/** @var float : Definition des Schwarzanteil */
protected float $key;
@@ -30,7 +30,7 @@ class CyanMagentaYellowKeyToHueSaturationValue
protected float $minCmyProperty;
// Daten für HSV
/** @var float : Definition des Farbton als Anteil eines Vollkreises '$Hue * π' */
/** @var float : Definition des Farbtones als Anteil eines Vollkreises '$Hue * π' */
protected float $hue = 0.0;
/** @var float : Definition der Sättigung der Farbe */
protected float $saturation = 0.0;
@@ -77,7 +77,7 @@ class CyanMagentaYellowKeyToHueSaturationValue
protected function buildHueAmount(): float
{
// Wenn beide Werte gleich sind, ist die Endfarbe Grau.
// Damit wird auch in {@sse hueAmount()} eine Division durch Null verhindert.
// Damit wird auch in {@sse hueAmount()} eine Division durch '0' verhindert.
if ($this->maxCmyProperty === $this->minCmyProperty) {
return 0.0;
}
@@ -9,11 +9,11 @@ use TorstenHettstedt\Colors\ColorModels\CyanMagentaYellowKey;
class HueSaturationValueToCyanMagentaYellowKey extends AbstractHueSaturationValueToUtility
{
// Daten für CMYK
/** @var float : Definition des Cyan-Anteil */
/** @var float : Definition des Cyan-Anteils */
protected float $cyan = 0.0;
/** @var float : Definition des Magenta-Anteil */
/** @var float : Definition des Magenta-Anteils */
protected float $magenta = 0.0;
/** @var float : Definition des Gelbanteil */
/** @var float : Definition des Gelbanteils */
protected float $yellow = 0.0;
/** @var float : Definition des Schwarzanteil */
protected float $key = 0.0;
@@ -9,11 +9,11 @@ use TorstenHettstedt\Colors\ColorModels\RedGreenBlue;
class HueSaturationValueToRedGreenBlue extends AbstractHueSaturationValueToUtility
{
// Daten für RGB
/** @var float : Definition des Rotanteil */
/** @var float : Definition des Rotanteils */
protected float $red = 1.0;
/** @var float : Definition des Grünanteil */
/** @var float : Definition des Grünanteils */
protected float $green = 1.0;
/** @var float : Definition des Blauanteil */
/** @var float : Definition des Blauanteils */
protected float $blue = 1.0;
public function convert(): RedGreenBlue
@@ -37,7 +37,7 @@ class HueSaturationValueToRedGreenBlue extends AbstractHueSaturationValueToUtili
{
// ID des zu nutzenden Interval
$interval_id = $this->hueAsPercentGrad / self::INTERVAL;
// Ist der Wert der entgegen gesetzten Farbe.
// der Wert der entgegen gesetzten Farbe
$opposite_color_value = $this->value * ( 1 - $this->saturation);
switch ((int)$interval_id) {
@@ -13,11 +13,11 @@ class RedGreenBlueToHueSaturationValue
const PROPERTY_BLUE = 'blue';
// Daten für RGB
/** @var float : Definition des Rotanteil */
/** @var float : Definition des Rot-Anteils */
protected float $red;
/** @var float : Definition des Grünanteil */
/** @var float : Definition des Grün-Anteils */
protected float $green;
/** @var float : Definition des Blauanteil */
/** @var float : Definition des Blau-Anteils */
protected float $blu;
/** @var float : Der größte RGB-Farbwert */
@@ -26,7 +26,7 @@ class RedGreenBlueToHueSaturationValue
protected float $minRgbProperty;
// Daten für HSV
/** @var float : Definition des Farbton als Anteil eines Vollkreises '$Hue * π' */
/** @var float : Definition des Farbtones als Anteil eines Vollkreises '$Hue * π' */
protected float $hue = 0.0;
/** @var float : Definition der Sättigung der Farbe */
protected float $saturation = 0.0;
@@ -75,7 +75,7 @@ class RedGreenBlueToHueSaturationValue
protected function buildHueAmount(): float
{
// Wenn beide Werte gleich sind, ist die Endfarbe Grau.
// Damit wird auch in {@sse hueAmount()} eine Division durch Null verhindert.
// Damit wird auch in {@sse hueAmount()} eine Division durch '0' verhindert.
if ($this->maxRgbProperty === $this->minRgbProperty) {
return 0.0;
}