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