Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | function get_server_version_id(Client $client) : int |
||
31 | { |
||
32 | $connection = $client->getHandler()->getConnection(); |
||
33 | if (!$greeting = $connection->open()) { |
||
34 | throw new \RuntimeException('Failed to retrieve the server version.'); |
||
35 | } |
||
36 | |||
37 | return $greeting->getServerVersionId(); |
||
38 | } |
||
39 |