Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
34 | 6 | public function deserialize(array $serializedObject) |
|
35 | { |
||
36 | 6 | if (! in_array(Serializable::class, class_implements($serializedObject['class']))) { |
|
37 | 3 | throw new SerializationException( |
|
38 | sprintf( |
||
39 | 3 | 'Class \'%s\' does not implement Serializable', |
|
40 | 3 | $serializedObject['class'] |
|
41 | ) |
||
42 | ); |
||
43 | } |
||
44 | 3 | return $serializedObject['class']::deserialize($serializedObject['payload']); |
|
45 | } |
||
46 | } |