Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
33 | 36 | function db () { |
|
34 | 36 | if (is_object($this->_db)) { |
|
35 | 36 | return $this->_db; |
|
36 | } |
||
37 | 36 | if (is_object($this->_db_prime)) { |
|
38 | 22 | return $this->_db = $this->_db_prime; |
|
39 | } |
||
40 | /** |
||
41 | * Save reference for faster access |
||
42 | */ |
||
43 | /** @noinspection ExceptionsAnnotatingAndHandlingInspection */ |
||
44 | 30 | $this->_db = DB::instance()->db($this->cdb()); |
|
45 | 30 | return $this->_db; |
|
46 | } |
||
47 | /** |
||
70 |