Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function hydrate(HookInterface $apiService, $entityName) |
||
17 | { |
||
18 | $hydratedEntity = new $entityName(); |
||
19 | |||
20 | if (!$hydratedEntity instanceof HookEventInterface) { |
||
21 | throw new LogicException("Can't hydrate this event"); |
||
22 | } |
||
23 | |||
24 | $hydratedEntity->setEmail($apiService->getEmail()); |
||
25 | $hydratedEntity->setName($apiService->getService()); |
||
26 | $hydratedEntity->setMetaData($apiService->getMetaData()); |
||
27 | |||
28 | return $hydratedEntity; |
||
29 | } |
||
30 | } |
||
31 |