| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 4 | public function getConnection() : Connection |
|
| 40 | { |
||
| 41 | 4 | if ($this->helperSet->has($this->helperName)) { |
|
| 42 | 2 | $connectionHelper = $this->helperSet->get($this->helperName); |
|
| 43 | |||
| 44 | 2 | if ($connectionHelper instanceof ConnectionHelper) { |
|
| 45 | 2 | return $connectionHelper->getConnection(); |
|
| 46 | } |
||
| 47 | } |
||
| 48 | |||
| 49 | 2 | return $this->fallback->getConnection(); |
|
| 50 | } |
||
| 52 |