Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | 462 | public function __construct(array $config = []) |
|
19 | { |
||
20 | 462 | $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; |
|
21 | |||
22 | 462 | $config = array_merge([ |
|
23 | 462 | 'base_uri' => Vindi::getApiUri(), |
|
24 | 462 | 'auth' => [Vindi::getApiKey(), '', 'BASIC'], |
|
25 | 'headers' => [ |
||
26 | 462 | 'Content-Type' => 'application/json', |
|
27 | 462 | 'User-Agent' => trim('Vindi-PHP/' . Vindi::$sdkVersion . "; {$host}"), |
|
28 | 462 | ], |
|
29 | 462 | 'verify' => Vindi::getCertPath(), |
|
30 | 462 | 'timeout' => Vindi::getApiTimeOut(), |
|
31 | 'curl.options' => [ |
||
32 | 462 | 'CURLOPT_SSLVERSION' => 'CURL_SSLVERSION_TLSv1_2', |
|
33 | ] |
||
34 | 462 | ], $config); |
|
35 | |||
36 | |||
37 | 462 | parent::__construct($config); |
|
38 | 462 | } |
|
39 | } |
||
40 |