1 | <?php |
||
20 | class EmptyHandler |
||
21 | { |
||
22 | /** |
||
23 | * Serialize Hash object |
||
24 | * |
||
25 | * @param JsonSerializationVisitor $visitor Visitor |
||
26 | * @param Hash $data Data |
||
27 | * @param array $type Type |
||
28 | * @param Context $context Context |
||
29 | * @return array |
||
|
|||
30 | */ |
||
31 | public function serializeEmptyToJson( |
||
39 | |||
40 | /** |
||
41 | * Deserialize Hash object |
||
42 | * |
||
43 | * @param JsonDeserializationVisitor $visitor Visitor |
||
44 | * @param array $data Data |
||
45 | * @param array $type Type |
||
46 | * @param Context $context Context |
||
47 | * @return Hash |
||
48 | */ |
||
49 | public function deserializeEmptyFromJson( |
||
57 | } |
||
58 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.