1 | <?php |
||
18 | class ApiCaller |
||
19 | { |
||
20 | |||
21 | /** @var Logger */ |
||
22 | private $logger; |
||
23 | |||
24 | /** @var int */ |
||
25 | private $responseHttpCode; |
||
26 | |||
27 | /** @var string */ |
||
28 | private $responseBody; |
||
29 | |||
30 | /** @var string */ |
||
31 | private $responseContentType; |
||
32 | |||
33 | /** |
||
34 | * ApiCaller constructor. |
||
35 | * @param Logger $logger |
||
|
|||
36 | */ |
||
37 | public function __construct(Logger $logger = null) |
||
41 | |||
42 | /** |
||
43 | * @return int |
||
44 | */ |
||
45 | public function getResponseHttpCode() |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function getResponseBody() |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getResponseContentType() |
||
65 | |||
66 | |||
67 | /** |
||
68 | * @param array $options |
||
69 | * @return bool |
||
70 | * @throws BpostApiBusinessException |
||
71 | * @throws BpostApiResponseException |
||
72 | * @throws BpostApiSystemException |
||
73 | * @throws BpostCurlException |
||
74 | * @throws BpostInvalidResponseException |
||
75 | * @throws BpostInvalidXmlResponseException |
||
76 | */ |
||
77 | public function doCall(array $options) |
||
114 | |||
115 | /** |
||
116 | * If the httpCode is 200, return 200 |
||
117 | * If the httpCode is 203, return 200 |
||
118 | * If the httpCode is 404 ,return 404 |
||
119 | * ... |
||
120 | * |
||
121 | * @return int |
||
122 | */ |
||
123 | public function getHttpCodeType() |
||
127 | } |
||
128 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.