1 | <?php |
||
9 | class ResponseConverter |
||
10 | { |
||
11 | /** |
||
12 | * Convert a PSR-7 response to a data type you want to work with. |
||
13 | * |
||
14 | * @param ResponseInterface $response |
||
15 | * @param string $format |
||
|
|||
16 | * @param string $dataType |
||
17 | * |
||
18 | * @return ResponseInterface|\Psr\Http\Message\StreamInterface|\SimpleXMLElement|string |
||
19 | * |
||
20 | * @throws InvalidArgumentException |
||
21 | * @throws LinkedInTransferException |
||
22 | */ |
||
23 | public static function convert(ResponseInterface $response, $requestFormat, $dataType) |
||
45 | |||
46 | /** |
||
47 | * @param ResponseInterface $response |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | public static function convertToArray(ResponseInterface $response) |
||
55 | |||
56 | /** |
||
57 | * @param ResponseInterface $response |
||
58 | * |
||
59 | * @return \SimpleXMLElement |
||
60 | * |
||
61 | * @throws LinkedInTransferException |
||
62 | */ |
||
63 | public static function convertToSimpleXml(ResponseInterface $response) |
||
72 | } |
||
73 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.