Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function serializePayload(object $event): array |
||
16 | { |
||
17 | if ( ! $event instanceof $this->eventClassName) { |
||
18 | throw new \InvalidArgumentException(sprintf('Cannot serialize event that does not implement "%s".', $this->eventClassName)); |
||
19 | 5 | } |
|
20 | |||
21 | return $this->serializer->serializePayload($event); |
||
22 | } |
||
33 |