1 | <?php |
||
14 | class Json |
||
15 | { |
||
16 | /** |
||
17 | * Decodes a JSON string into appropriate variable. |
||
18 | * |
||
19 | * @param string $str JSON-formatted string |
||
20 | * @param boolean $accos When true, returned objects will be converted into associative arrays. |
||
|
|||
21 | * @return mixed number, boolean, string, array, or object corresponding to given JSON input string. |
||
22 | * Note that decode() always returns strings in ASCII or UTF-8 format! |
||
23 | */ |
||
24 | 34 | public static function decode($str, $assoc = false) |
|
34 | |||
35 | /** |
||
36 | * Encodes an arbitrary variable into JSON format. |
||
37 | * |
||
38 | * @param mixed $var any number, boolean, string, array, or object to be encoded. |
||
39 | * if var is a string, note that encode() always expects it |
||
40 | * to be in ASCII or UTF-8 format! |
||
41 | * @return mixed JSON string representation of input var or an error if a problem occurs |
||
42 | */ |
||
43 | 2 | public static function encode($var) |
|
53 | |||
54 | /** |
||
55 | * Return a new object of Services_JSON class. |
||
56 | * Used if native PHP JSON extension is not available. |
||
57 | */ |
||
58 | private static function getJsonService() |
||
62 | |||
63 | } |
||
64 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.