1 | <?php |
||
18 | class JCFirebase |
||
19 | { |
||
20 | public $firebaseURI; |
||
21 | |||
22 | public $rootPath; |
||
23 | |||
24 | public $requestHeader = array( |
||
25 | 'accept' => 'application/json', |
||
26 | 'contentType' => 'application/json; charset=utf-8', |
||
27 | 'dataType' => 'json' |
||
28 | ); |
||
29 | |||
30 | public $requestOptions = array(); |
||
31 | |||
32 | /** |
||
33 | * @var OAuth |
||
34 | */ |
||
35 | public $auth; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * JCFirebase constructor. |
||
40 | * |
||
41 | * @param $firebaseURI |
||
42 | * @param array $firebaseAuth |
||
|
|||
43 | * @param string $rootPath |
||
44 | */ |
||
45 | public function __construct($firebaseURI, OAuth $auth, $rootPath = '/') |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @param $firebaseURI |
||
55 | * @param $jsonString |
||
56 | * @param string $rootPath |
||
57 | * @return JCFirebase |
||
58 | * @throws \Exception |
||
59 | */ |
||
60 | public static function fromJson($firebaseURI, $jsonString, $rootPath = '/') |
||
71 | |||
72 | /** |
||
73 | * @param $firebaseURI |
||
74 | * @param $keyFile |
||
75 | * @param string $rootPath |
||
76 | * |
||
77 | * @return JCFirebase |
||
78 | * @throws \Exception |
||
79 | */ |
||
80 | public static function fromKeyFile($firebaseURI, $keyFile, $rootPath = '/') |
||
91 | |||
92 | public function getPathURI($path = '', $print = '') |
||
129 | |||
130 | public function getShallow($path = '', $options = array()) |
||
140 | |||
141 | /** |
||
142 | * @param string $path |
||
143 | * @param array $options |
||
144 | * |
||
145 | * @return \Requests_Response |
||
146 | */ |
||
147 | public function get($path = '', $options = array()) |
||
154 | |||
155 | /** |
||
156 | * @param string $path |
||
157 | * @param array $options |
||
158 | * |
||
159 | * @return \Requests_Response |
||
160 | */ |
||
161 | public function put($path = '', $options = array()) |
||
166 | |||
167 | /** |
||
168 | * @param string $path |
||
169 | * @param array $options |
||
170 | * |
||
171 | * @return \Requests_Response |
||
172 | */ |
||
173 | public function post($path = '', $options = array()) |
||
178 | |||
179 | /** |
||
180 | * @param string $path |
||
181 | * @param array $options |
||
182 | * |
||
183 | * @return \Requests_Response |
||
184 | */ |
||
185 | public function patch($path = '', $options = array()) |
||
190 | |||
191 | /** |
||
192 | * @param string $path |
||
193 | * @param array $options |
||
194 | * |
||
195 | * @return \Requests_Response |
||
196 | */ |
||
197 | public function delete($path = '', $options = array()) |
||
202 | |||
203 | /** |
||
204 | * Function that check firebase authencation |
||
205 | * and configuration valid or not |
||
206 | * |
||
207 | * @return bool |
||
208 | */ |
||
209 | public function isValid() |
||
215 | |||
216 | protected function refreshToken() |
||
220 | |||
221 | protected function addDataToPathURI($path = '', $options = array(), $reqType = Option::REQ_TYPE_GET) |
||
232 | |||
233 | protected function addDataToRequest($options = array(), $jsonEncode = false) |
||
247 | } |
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.