Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
ApieListToArray
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 convert
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\StorageMetadata\Converters;
3
4use Apie\Core\Lists\ItemHashmap;
5use Apie\Core\Lists\ItemList;
6use Apie\Core\Lists\ItemSet;
7use Apie\TypeConverter\ConverterInterface;
8
9/**
10 * @template T
11 * @implements ConverterInterface<ItemHashmap<T>|ItemList<T>|ItemSet<T>, array<int, T>>
12 */
13class 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}