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