Skip to content

Commit 27863c7

Browse files
committed
- Updated Composer.
1 parent 6e2c8f0 commit 27863c7

File tree

7 files changed

+106
-106
lines changed

7 files changed

+106
-106
lines changed

composer.lock

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Color.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ class Color
4141
/**
4242
* New Color constructor.
4343
*
44-
* @param int|float $r The red value, or the brightness value.
45-
* @param int|float $g The green value or the alpha value.
46-
* @param int|float $a The alpha value.
47-
* @param int|float|null $g The blue value.
44+
* @param float|int $r The red value, or the brightness value.
45+
* @param float|int $g The green value or the alpha value.
46+
* @param float|int $a The alpha value.
47+
* @param float|int|null $g The blue value.
4848
*/
4949
public function __construct(float|int $r = 0, float|int $g = 1, float|int|null $b = null, float|int $a = 1)
5050
{

src/Traits/AttributesTrait.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ trait AttributesTrait
1111
/**
1212
* Get the alpha value of the color.
1313
*
14-
* @return int|float The alpha value. (0, 1)
14+
* @return float|int The alpha value. (0, 1)
1515
*/
1616
public function getAlpha(): float|int
1717
{
@@ -21,7 +21,7 @@ public function getAlpha(): float|int
2121
/**
2222
* Get the brightness value of the color.
2323
*
24-
* @return int|float The brightness value. (0, 100)
24+
* @return float|int The brightness value. (0, 100)
2525
*/
2626
public function getBrightness(): float|int
2727
{
@@ -31,7 +31,7 @@ public function getBrightness(): float|int
3131
/**
3232
* Get the hue value of the color.
3333
*
34-
* @return int|float The hue value. (0, 360)
34+
* @return float|int The hue value. (0, 360)
3535
*/
3636
public function getHue(): float|int
3737
{
@@ -41,7 +41,7 @@ public function getHue(): float|int
4141
/**
4242
* Get the saturation value of the color.
4343
*
44-
* @return int|float The saturation value. (0, 100)
44+
* @return float|int The saturation value. (0, 100)
4545
*/
4646
public function getSaturation(): float|int
4747
{
@@ -61,7 +61,7 @@ public function luma(): float
6161
/**
6262
* Set the alpha value of the color.
6363
*
64-
* @param int|float $a The alpha value. (0, 1)
64+
* @param float|int $a The alpha value. (0, 1)
6565
* @return Color A new Color.
6666
*/
6767
public function setAlpha(float|int $a): static
@@ -72,7 +72,7 @@ public function setAlpha(float|int $a): static
7272
/**
7373
* Set the brightness value of the color.
7474
*
75-
* @param int|float $v The brightness value. (0, 100)
75+
* @param float|int $v The brightness value. (0, 100)
7676
* @return Color A new Color.
7777
*/
7878
public function setBrightness(float|int $v): static
@@ -86,7 +86,7 @@ public function setBrightness(float|int $v): static
8686
/**
8787
* Set the hue value of the color.
8888
*
89-
* @param int|float $h The hue value. (0, 360)
89+
* @param float|int $h The hue value. (0, 360)
9090
* @return Color A new Color.
9191
*/
9292
public function setHue(float|int $h): static
@@ -100,7 +100,7 @@ public function setHue(float|int $h): static
100100
/**
101101
* Set the saturation value of the color.
102102
*
103-
* @param int|float $s The saturation value. (0, 100)
103+
* @param float|int $s The saturation value. (0, 100)
104104
* @return Color A new Color.
105105
*/
106106
public function setSaturation(float|int $s): static

src/Traits/ConversionTrait.php

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ trait ConversionTrait
1717
/**
1818
* Convert CMY color values to CMYK.
1919
*
20-
* @param int|float $c The cyan value. (0, 100)
21-
* @param int|float $m The magenta value. (0, 100)
22-
* @param int|float $y The yellow value. (0, 100)
20+
* @param float|int $c The cyan value. (0, 100)
21+
* @param float|int $m The magenta value. (0, 100)
22+
* @param float|int $y The yellow value. (0, 100)
2323
* @return array An array containing the CMYK values.
2424
*/
2525
protected static function CMY2CMYK(float|int $c, float|int $m, float|int $y): array
@@ -43,9 +43,9 @@ protected static function CMY2CMYK(float|int $c, float|int $m, float|int $y): ar
4343
/**
4444
* Convert CMY color values to RGB.
4545
*
46-
* @param int|float $c The cyan value. (0, 100)
47-
* @param int|float $m The magenta value. (0, 100)
48-
* @param int|float $y The yellow value. (0, 100)
46+
* @param float|int $c The cyan value. (0, 100)
47+
* @param float|int $m The magenta value. (0, 100)
48+
* @param float|int $y The yellow value. (0, 100)
4949
* @return array An array containing the RGB values.
5050
*/
5151
protected static function CMY2RGB(float|int $c, float|int $m, float|int $y): array
@@ -60,10 +60,10 @@ protected static function CMY2RGB(float|int $c, float|int $m, float|int $y): arr
6060
/**
6161
* Convert CMYK color values to CMY.
6262
*
63-
* @param int|float $c The cyan value. (0, 100)
64-
* @param int|float $m The magenta value. (0, 100)
65-
* @param int|float $y The yellow value. (0, 100)
66-
* @param int|float $k The key value. (0, 100)
63+
* @param float|int $c The cyan value. (0, 100)
64+
* @param float|int $m The magenta value. (0, 100)
65+
* @param float|int $y The yellow value. (0, 100)
66+
* @param float|int $k The key value. (0, 100)
6767
* @return array An array containing the CMY values.
6868
*/
6969
protected static function CMYK2CMY(float|int $c, float|int $m, float|int $y, float|int $k): array
@@ -80,9 +80,9 @@ protected static function CMYK2CMY(float|int $c, float|int $m, float|int $y, flo
8080
/**
8181
* Convert HSL color values to RGB.
8282
*
83-
* @param int|float $h The hue value. (0, 360)
84-
* @param int|float $s The saturation value. (0, 100)
85-
* @param int|float $l The lightness value. (0, 100)
83+
* @param float|int $h The hue value. (0, 360)
84+
* @param float|int $s The saturation value. (0, 100)
85+
* @param float|int $l The lightness value. (0, 100)
8686
* @return array An array containing the RGB values.
8787
*/
8888
protected static function HSL2RGB(float|int $h, float|int $s, float|int $l): array
@@ -117,9 +117,9 @@ protected static function HSL2RGB(float|int $h, float|int $s, float|int $l): arr
117117
/**
118118
* Convert HSV color values to RGB.
119119
*
120-
* @param int|float $h The hue value. (0, 360)
121-
* @param int|float $s The saturation value. (0, 100)
122-
* @param int|float $v The brightness value (0, 100)
120+
* @param float|int $h The hue value. (0, 360)
121+
* @param float|int $s The saturation value. (0, 100)
122+
* @param float|int $v The brightness value (0, 100)
123123
* @return array An array containing the RGB values.
124124
*/
125125
protected static function HSV2RGB(float|int $h, float|int $s, float|int $v): array
@@ -185,9 +185,9 @@ protected static function HSV2RGB(float|int $h, float|int $s, float|int $v): arr
185185
/**
186186
* Convert RGB color values to CMY.
187187
*
188-
* @param int|float $r The red value. (0, 255)
189-
* @param int|float $g The green value. (0, 255)
190-
* @param int|float $b The blue value. (0, 255)
188+
* @param float|int $r The red value. (0, 255)
189+
* @param float|int $g The green value. (0, 255)
190+
* @param float|int $b The blue value. (0, 255)
191191
* @return array An array containing the CMY values.
192192
*/
193193
protected static function RGB2CMY(float|int $r, float|int $g, float|int $b): array
@@ -202,9 +202,9 @@ protected static function RGB2CMY(float|int $r, float|int $g, float|int $b): arr
202202
/**
203203
* Convert RGB color values to HSL.
204204
*
205-
* @param int|float $r The red value. (0, 255)
206-
* @param int|float $g The green value. (0, 255)
207-
* @param int|float $b The blue value. (0, 255)
205+
* @param float|int $r The red value. (0, 255)
206+
* @param float|int $g The green value. (0, 255)
207+
* @param float|int $b The blue value. (0, 255)
208208
* @return array An array containing the HSL values.
209209
*/
210210
protected static function RGB2HSL(float|int $r, float|int $g, float|int $b): array
@@ -256,9 +256,9 @@ protected static function RGB2HSL(float|int $r, float|int $g, float|int $b): arr
256256
/**
257257
* Convert RGB color values to HSV.
258258
*
259-
* @param int|float $r The red value. (0, 255)
260-
* @param int|float $g The green value. (0, 255)
261-
* @param int|float $b The blue value. (0, 255)
259+
* @param float|int $r The red value. (0, 255)
260+
* @param float|int $g The green value. (0, 255)
261+
* @param float|int $b The blue value. (0, 255)
262262
* @return array An array containing the HSV values.
263263
*/
264264
protected static function RGB2HSV(float|int $r, float|int $g, float|int $b): array
@@ -305,9 +305,9 @@ protected static function RGB2HSV(float|int $r, float|int $g, float|int $b): arr
305305
/**
306306
* Calculate the relative luminance of an RGB color.
307307
*
308-
* @param int|float $r The red value. (0, 255)
309-
* @param int|float $g The green value. (0, 255)
310-
* @param int|float $b The blue value. (0, 255)
308+
* @param float|int $r The red value. (0, 255)
309+
* @param float|int $g The green value. (0, 255)
310+
* @param float|int $b The blue value. (0, 255)
311311
* @return float The relative luminance value.
312312
*/
313313
protected static function RGB2Luma(float|int $r, float|int $g, float|int $b): float
@@ -322,10 +322,10 @@ protected static function RGB2Luma(float|int $r, float|int $g, float|int $b): fl
322322
/**
323323
* Calculate the R, G or B value of a hue.
324324
*
325-
* @param int|float $v1 The first value.
326-
* @param int|float $v2 The second value.
327-
* @param int|float $vH The hue value.
328-
* @return int|float The R, G or B value.
325+
* @param float|int $v1 The first value.
326+
* @param float|int $v2 The second value.
327+
* @param float|int $vH The hue value.
328+
* @return float|int The R, G or B value.
329329
*/
330330
protected static function RGBHue(float|int $v1, float|int $v2, float|int $vH): float|int
331331
{
@@ -349,8 +349,8 @@ protected static function RGBHue(float|int $v1, float|int $v2, float|int $vH): f
349349
/**
350350
* Calculate the relative R, G or B value for luma calculation.
351351
*
352-
* @param int|float $v The value.
353-
* @return int|float The R, G or B value.
352+
* @param float|int $v The value.
353+
* @return float|int The R, G or B value.
354354
*/
355355
protected static function RGBLumaValue(float|int $v): float|int
356356
{

0 commit comments

Comments
 (0)