Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
24 | 5 | public function unserializePayload(string $className, array $payload): object |
|
25 | 5 | { |
|
26 | if ( ! is_subclass_of($className, $this->eventClassName)) { |
||
27 | 2 | throw new \InvalidArgumentException(sprintf('Cannot unserialize payload into an event that does not implement "%s".', $this->eventClassName)); |
|
28 | } |
||
29 | 2 | ||
30 | 1 | return $this->serializer->unserializePayload($className, $payload); |
|
31 | } |
||
33 |