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