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