| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | public function getConnection() { |
||
| 58 | |||
| 59 | if ( $this->connection === null ) { |
||
| 60 | $this->connection = wfGetLB( $this->wiki )->getConnection( $this->connectionId, $this->groups, $this->wiki ); |
||
| 61 | } |
||
| 62 | |||
| 63 | if ( $this->isConnection( $this->connection ) ) { |
||
| 64 | return $this->connection; |
||
| 65 | } |
||
| 66 | |||
| 67 | throw new RuntimeException( 'Expected a DatabaseBase instance' ); |
||
| 68 | } |
||
| 69 | |||
| 86 |