Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
CollectionOrderedFactory | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
makeCollection | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace pvc\struct\collection; |
6 | |
7 | use pvc\interfaces\struct\collection\CollectionFactoryInterface; |
8 | use pvc\interfaces\struct\collection\CollectionOrderedInterface; |
9 | use pvc\interfaces\struct\collection\IndexedElementInterface; |
10 | |
11 | /** |
12 | * @template ElementType of IndexedElementInterface |
13 | * @template CollectionType of CollectionOrderedInterface |
14 | * @implements CollectionFactoryInterface<ElementType, CollectionType> |
15 | */ |
16 | class CollectionOrderedFactory implements CollectionFactoryInterface |
17 | { |
18 | /** |
19 | * @param array<non-negative-int, ElementType> $elements |
20 | * @return CollectionType<ElementType> |
21 | */ |
22 | public function makeCollection(array $elements = []) |
23 | { |
24 | return new CollectionOrdered($elements); |
25 | } |
26 | } |