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