| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function serializePayload(object $event): array |
||
| 21 | { |
||
| 22 | if ( ! $event instanceof $this->eventClassName) { |
||
| 23 | throw new \InvalidArgumentException(sprintf( |
||
| 24 | 'Cannot serialize event that does not implement "%s".', |
||
| 25 | $this->eventClassName |
||
| 26 | )); |
||
| 27 | } |
||
| 28 | |||
| 29 | return $this->serializer->serializePayload($event); |
||
| 30 | } |
||
| 44 |