Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 2.0625 |
Changes | 0 |
1 | <?php declare(strict_types=1); defined('BASEPATH') or exit('No direct script access allowed'); |
||
19 | 96 | public function database($params = '', $return = FALSE, $active_record = NULL) { |
|
20 | // load our version of the CI_DB_Cache class. The database library checks |
||
21 | // if this class is already loaded before instantiating it. Loading it now |
||
22 | // makes sure our version is used when a controller enables query caching |
||
23 | 96 | if(!class_exists('CI_DB_Cache')) { |
|
24 | @include(APPPATH . 'libraries/MY_DB_cache.php'); |
||
|
|||
25 | } |
||
26 | |||
27 | // call the parent method to retain the CI functionality |
||
28 | 96 | return parent::database($params, $return, $active_record); |
|
29 | } |
||
30 | } |
||
31 |
If you suppress an error, we recommend checking for the error condition explicitly: