Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function writeTo(object $target, array $input): void |
||
31 | { |
||
32 | $data = []; |
||
33 | try { |
||
34 | foreach ($this->properties as $property) { |
||
35 | $data[$property->name()] = $property->value($input, $target); |
||
36 | } |
||
37 | } catch (UnmappableInput $exception) { |
||
38 | throw HydrationFailed::encountered($exception, $target); |
||
39 | } |
||
40 | $this->hydrator->writeTo($target, $data); |
||
41 | } |
||
43 |