| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function unserializePayload(string $className, array $payload): object |
|
| 33 | { |
||
| 34 | 2 | if ( ! is_subclass_of($className, $this->eventClassName)) { |
|
| 35 | 1 | throw new \InvalidArgumentException(sprintf( |
|
| 36 | 1 | 'Cannot unserialize payload into an event that does not implement "%s".', |
|
| 37 | 1 | $this->eventClassName |
|
| 38 | )); |
||
| 39 | } |
||
| 40 | |||
| 41 | 1 | return $this->serializer->unserializePayload($className, $payload); |
|
| 42 | } |
||
| 44 |