Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
38 | private function haveAccess(): bool |
||
39 | { |
||
40 | $uri = (string) config('bunq.uri'); |
||
41 | $token = (string) config('bunq.access_token'); |
||
42 | $request = new SystemInformationRequest($uri, $token); |
||
43 | try { |
||
44 | $request->get(); |
||
45 | } catch (ApiHttpException $e) { |
||
46 | $this->error(sprintf('Could not connect to Firefly III: %s', $e->getMessage())); |
||
|
|||
47 | |||
48 | return false; |
||
49 | } |
||
50 | |||
51 | return true; |
||
52 | } |
||
54 |