Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
ApieListToArray | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
convert | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\StorageMetadata\Converters; |
3 | |
4 | use Apie\Core\Lists\ItemHashmap; |
5 | use Apie\Core\Lists\ItemList; |
6 | use Apie\Core\Lists\ItemSet; |
7 | use Apie\TypeConverter\ConverterInterface; |
8 | |
9 | /** |
10 | * @template T |
11 | * @implements ConverterInterface<ItemHashmap<T>|ItemList<T>|ItemSet<T>, array<int, T>> |
12 | */ |
13 | class ApieListToArray implements ConverterInterface |
14 | { |
15 | /** |
16 | * @param ItemHashmap<T>|ItemList<T>|ItemSet<T> $input |
17 | * @return array<int, T> |
18 | */ |
19 | public function convert(ItemList|ItemHashmap|ItemSet $input): array |
20 | { |
21 | return $input->toArray(); |
22 | } |
23 | } |