1 | <?php |
||
9 | class JsonObjectSerializer implements Serializer |
||
10 | { |
||
11 | /** @var JsonTransformer */ |
||
12 | protected $transformer; |
||
13 | |||
14 | /** |
||
15 | * JsonObjectSerializer constructor. |
||
16 | */ |
||
17 | public function __construct() |
||
21 | |||
22 | /** |
||
23 | * Turns a data structure into a string that can be recovered. |
||
24 | * |
||
25 | * @param mixed $data |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | public function serialize($data) : string |
||
33 | |||
34 | /** |
||
35 | * Turns string data structure into an usable $data structure. |
||
36 | * |
||
37 | * @param string $data |
||
38 | * |
||
39 | * @return \stdClass |
||
40 | */ |
||
41 | public function unserialize(string $data) |
||
45 | } |
||
46 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..