| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.7462 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 18 | public function hydrate($object, array $data) : void |
|
| 33 | { |
||
| 34 | 18 | if (! $object instanceof HydratableInterface) { |
|
| 35 | throw new InvalidArgumentException(sprintf( |
||
| 36 | 'Class %s does not implement %s.', |
||
| 37 | get_class($object), |
||
| 38 | HydratableInterface::class |
||
| 39 | )); |
||
| 40 | } |
||
| 41 | |||
| 42 | 18 | $object->hydrate($data, $this->objectManager); |
|
| 43 | 18 | } |
|
| 45 |