Conditions | 3 |
Paths | 4 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 29 | public function __construct(object $curl) |
|
17 | { |
||
18 | 29 | $filePath = "/config/api_ipstack.php"; |
|
19 | 29 | $apiKey = "apiKey"; |
|
20 | 29 | $file = ANAX_INSTALL_PATH . $filePath; |
|
21 | 29 | $ipStack = file_exists($file) ? require $file : null; |
|
22 | 29 | $this->api = $ipStack ? $ipStack[$apiKey] : getenv("API_KEY"); |
|
23 | 29 | $this->curl = $curl; |
|
24 | 29 | } |
|
68 |