| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | final class ImmutableCollectionHydrator implements Hydrates |
||
| 17 | { |
||
| 18 | private function __construct() |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Produces a collection hydrator. |
||
| 24 | * |
||
| 25 | * @return Hydrates A hydrator that calls the constructor through reflection. |
||
| 26 | */ |
||
| 27 | public static function default(): Hydrates |
||
| 28 | { |
||
| 29 | return new ImmutableCollectionHydrator(); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** @inheritdoc */ |
||
| 33 | public function writeTo(object $collection, array $input): void |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | /** @throws ReflectionException */ |
||
| 43 | private function write(object $collection, array $input): void |
||
| 48 | } |
||
| 49 | } |
||
| 50 |