Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 913 | public function convert(Color $color, string $fqcn): Color |
|
19 | { |
||
20 | 913 | if (\get_class($color) === $fqcn) { |
|
21 | 260 | return clone $color; |
|
22 | } |
||
23 | |||
24 | 653 | foreach ($this->converterGraph->getConverterChain(\get_class($color), $fqcn) as $converter) { |
|
25 | 652 | $color = $converter->convert($color); |
|
26 | } |
||
27 | |||
28 | 652 | return $color; |
|
29 | } |
||
31 |