| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function getConnection(): Connection |
||
| 16 | { |
||
| 17 | if (empty($this->client)) { |
||
| 18 | $apiKey = getenv('API_KEY'); |
||
| 19 | if (empty($apiKey)) { |
||
| 20 | throw new RuntimeException('API_KEY not provided. Please pass it through phpunit.xml or env variables'); |
||
| 21 | } |
||
| 22 | $this->client = new Connection($apiKey, new Client()); |
||
| 23 | } |
||
| 24 | return $this->client; |
||
| 25 | } |
||
| 27 |