| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 15 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 34 | public function validateKey()  | 
            ||
| 35 |     { | 
            ||
| 36 |         try { | 
            ||
| 37 |             $this->api->get(''); | 
            ||
| 38 |         } catch (\Exception $e) { | 
            ||
| 39 |             if (starts_with($e->getMessage(), '{')) { | 
            ||
| 40 | $json = json_decode($e->getMessage());  | 
            ||
| 41 |                 if ($json->status == 401) { | 
            ||
| 42 | throw new InvalidApiKey($json->detail);  | 
            ||
| 43 | }  | 
            ||
| 44 | }  | 
            ||
| 45 | |||
| 46 | throw $e;  | 
            ||
| 47 | }  | 
            ||
| 48 | }  | 
            ||
| 49 | }  |