Conditions | 2 |
Paths | 6 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.5 |
Changes | 0 |
1 | <?php |
||
59 | 2 | public function check() |
|
60 | { |
||
61 | try { |
||
62 | 2 | $conn = $this->client->getConnect(); |
|
63 | $conn->channel(); |
||
64 | |||
65 | $conn->isConnected(); |
||
66 | $version = $conn->getServerProperties()['version'][1]; |
||
67 | |||
68 | return new Success(null, $version); |
||
69 | 2 | } catch (\Exception $e) { |
|
70 | 2 | return new Failure($e->getMessage()); |
|
71 | } |
||
74 |