Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function makeRequest($request = "", $type = "GET") |
||
16 | { |
||
17 | $client = new Client(); |
||
18 | $_request = $client->request($type, $this->CF->Endpoint . $request, [ |
||
19 | 'headers' => [ |
||
20 | 'X-Auth-Key' => $this->CF->APIKEY, |
||
21 | 'X-Auth-Email' => $this->CF->Email |
||
22 | ] |
||
23 | ]); |
||
24 | |||
25 | $this->response = $this->__toArray((string) $_request->getBody()); |
||
26 | |||
27 | return $this->response; |
||
28 | } |
||
29 | |||
35 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: