Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class TraversableToArrayConverter implements ConverterInterface |
||
16 | { |
||
17 | 1 | public function convert($value) |
|
18 | { |
||
19 | 1 | return iterator_to_array($value); |
|
20 | } |
||
21 | |||
22 | 1 | public function supports($value): bool |
|
23 | { |
||
24 | 1 | return $value instanceof \Traversable; |
|
25 | } |
||
26 | |||
27 | 1 | public function getType(): string |
|
30 | } |
||
31 | |||
32 | 1 | public function getPriority(): int |
|
35 | } |
||
36 | } |
||
37 |