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