| Conditions | 4 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 43 | public function performCheck() |
||
| 44 | { |
||
| 45 | try { |
||
| 46 | if (!$this->getClient()->ping()) { |
||
| 47 | throw ElasticsearchPingCheckException::pingFailed( |
||
| 48 | $this->getClient()->transport->lastConnection->getHost() |
||
| 49 | ); |
||
| 50 | } |
||
| 51 | } catch (Exception $e) { |
||
| 52 | if (!$e instanceof ElasticsearchException) { |
||
| 53 | throw $e; |
||
| 54 | } |
||
| 55 | throw ElasticsearchPingCheckException::internalGetProblem($e); |
||
| 56 | } |
||
| 57 | } |
||
| 58 | |||
| 75 |