Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace Picqer\Financials\Exact\Persistance; |
||
16 | public function download() |
||
17 | { |
||
18 | $client = new Client(); |
||
19 | |||
20 | $uri = $this->Url . '&Download=1'; |
||
21 | |||
22 | $headers = [ |
||
23 | 'Accept' => 'application/json', |
||
24 | 'Content-Type' => 'application/json', |
||
25 | 'Prefer' => 'return=representation', |
||
26 | 'Authorization' => 'Bearer ' . $this->connection->getAccessToken(), |
||
27 | ]; |
||
28 | |||
29 | $res = $client->get($uri, [ |
||
30 | 'headers' => $headers |
||
31 | ]); |
||
32 | |||
33 | return $res->getBody(); |
||
34 | } |
||
36 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.