Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
DoctrineCollectionToArray | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
convert | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | namespace Apie\Core\TypeConverters; |
3 | |
4 | use Apie\TypeConverter\ConverterInterface; |
5 | use Doctrine\Common\Collections\Collection; |
6 | |
7 | /** |
8 | * @template T |
9 | * @implements ConverterInterface<Collection<int, T>, array<int, T>> |
10 | */ |
11 | class DoctrineCollectionToArray implements ConverterInterface |
12 | { |
13 | /** |
14 | * @param Collection<int, T> $input |
15 | * @return array<int, T> |
16 | */ |
17 | public function convert(Collection $input): array |
18 | { |
19 | return $input->toArray(); |
20 | } |
21 | } |