| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function writeTo(object $target, array $input): void |
||
| 43 | { |
||
| 44 | $data = []; |
||
| 45 | try { |
||
| 46 | foreach ($this->properties as $property) { |
||
| 47 | $data[$property->name()] = $property->value($input, $target); |
||
| 48 | } |
||
| 49 | } catch (MappingFailure $exception) { |
||
| 50 | throw HydrationFailed::encountered($exception, $target, $input); |
||
| 51 | } |
||
| 52 | $this->hydrator->writeTo($target, $data); |
||
| 53 | } |
||
| 55 |