Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | 27 | public function __construct($userAgent = null) |
|
17 | { |
||
18 | 27 | if (is_null($userAgent)) { |
|
19 | 27 | $userAgent = 'commercetools-php-sdk/' . Client::VERSION; |
|
20 | |||
21 | 27 | $userAgent .= ' (' . $this->getAdapterInfo(); |
|
22 | 27 | if (extension_loaded('curl') && function_exists('curl_version')) { |
|
23 | 27 | $userAgent .= '; curl/' . \curl_version()['version']; |
|
24 | } |
||
25 | 27 | $userAgent .= ') PHP/' . PHP_VERSION; |
|
26 | } |
||
27 | 27 | $this->userAgent = $userAgent; |
|
28 | 27 | } |
|
48 |