Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function convert(FieldItemInterface $value) |
||
27 | { |
||
28 | foreach ($this->converters as $converter) { |
||
29 | if ($converter->canConvert($value)) { |
||
30 | return $converter->convert($value); |
||
31 | } |
||
32 | } |
||
33 | throw new \LogicException('Could not find a converter for value. Value type: '.get_class($value)); |
||
34 | } |
||
35 | |||
41 |