1 | <?php |
||
20 | class Response { |
||
21 | |||
22 | /** |
||
23 | * Contains the raw response |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | private $response; |
||
28 | |||
29 | /** |
||
30 | * Used curl instance |
||
31 | * |
||
32 | * @var curl |
||
33 | */ |
||
34 | private $curl; |
||
35 | |||
36 | /** |
||
37 | * Constructor |
||
38 | * |
||
39 | * @param string $response |
||
40 | * @param CurlBuilder $curl |
||
41 | * @param curl $curl |
||
42 | */ |
||
43 | 39 | public function __construct($response, CurlBuilder $curl) |
|
52 | |||
53 | /** |
||
54 | * Decode the string to an array |
||
55 | * |
||
56 | * @access private |
||
57 | * @param string $response |
||
58 | * @return array |
||
59 | */ |
||
60 | 39 | private function decodeString($response) |
|
64 | |||
65 | /** |
||
66 | * Return the requested key data |
||
67 | * |
||
68 | * @access public |
||
69 | * @param string $key |
||
70 | * @return mixed |
||
71 | */ |
||
72 | 32 | public function __get($key) |
|
76 | |||
77 | /** |
||
78 | * Return if the key is set |
||
79 | * |
||
80 | * @access public |
||
81 | * @param string $key |
||
82 | * @return boolean |
||
83 | */ |
||
84 | 19 | public function __isset($key) |
|
88 | |||
89 | /** |
||
90 | * Returns the error message which should normaly |
||
91 | * by located in the response->message key, but can |
||
92 | * also be localed in the response->error key. |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 1 | public function getMessage() |
|
100 | |||
101 | /** |
||
102 | * Get the response code from the request |
||
103 | * |
||
104 | * @access public |
||
105 | * @return int |
||
106 | */ |
||
107 | 39 | public function getResponseCode() |
|
111 | |||
112 | } |
||
113 |
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..