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