Skip to content

Commit e8df2a2

Browse files
committed
Try to make styleci happy
1 parent 4879ff4 commit e8df2a2

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

Classes/Domain/ValueObject/AbstractColor.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@
66

77
abstract class AbstractColor implements ColorInterface
88
{
9+
/**
10+
* @return HslaColor
11+
*/
12+
public function asHsla(): HslaColor
13+
{
14+
if ($this instanceof HslaColor) {
15+
return $this;
16+
} else {
17+
throw new \Exception('Conversion to hsla is not implemented');
18+
}
19+
}
20+
21+
/**
22+
* @return RgbaColor
23+
*/
24+
public function asRgba(): RgbaColor
25+
{
26+
if ($this instanceof RgbaColor) {
27+
return $this;
28+
} else {
29+
throw new \Exception('Conversion to rgba is not implemented');
30+
}
31+
}
32+
933
/**
1034
* @return string
1135
*/

Classes/Domain/ValueObject/HslaColor.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,6 @@ private function hue2rgb(float $p, float $q, float $t): float
143143
return $p;
144144
}
145145

146-
/**
147-
* @return HslaColor
148-
*/
149-
public function asHsla(): HslaColor
150-
{
151-
return $this;
152-
}
153-
154146
/**
155147
* @param float $delta 0..100
156148
*

Classes/Domain/ValueObject/RgbaColor.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,6 @@ public function getAlpha(): float
8989
return $this->alpha;
9090
}
9191

92-
/**
93-
* @return RgbaColor
94-
*/
95-
public function asRgba(): RgbaColor
96-
{
97-
return $this;
98-
}
99-
10092
/**
10193
* @return HslaColor
10294
*

0 commit comments

Comments
 (0)