Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | 131 | public function convert(Color $color): Color |
|
15 | { |
||
16 | /* @var HEX $color */ |
||
17 | 131 | Assert::isInstanceOf($color, HEX::class, sprintf('color should be an instance of [%s]', HEX::class)); |
|
18 | |||
19 | 130 | $red = hexdec($color->getRed()); |
|
20 | 130 | $green = hexdec($color->getGreen()); |
|
21 | 130 | $blue = hexdec($color->getBlue()); |
|
22 | |||
23 | 130 | return new RGB($red, $green, $blue); |
|
24 | } |
||
36 |