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