Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 0 |
1 | <?php |
||
15 | 29 | public static function getVersion() |
|
16 | { |
||
17 | 29 | if (!extension_loaded('curl')) { |
|
18 | throw new XsollaException('The PHP cURL extension must be installed to use Xsolla SDK for PHP.'); |
||
19 | } |
||
20 | |||
21 | 29 | $curlVersion = curl_version(); |
|
22 | |||
23 | 29 | return sprintf('xsolla-sdk-php/%s curl/%s PHP/%s', self::VERSION, $curlVersion['version'], PHP_VERSION); |
|
24 | } |
||
25 | } |
||
26 |