| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | trait DbTrait |
||
| 29 | { |
||
| 30 | /** |
||
| 31 | * Instance of Database |
||
| 32 | * |
||
| 33 | * @var Database|null |
||
| 34 | */ |
||
| 35 | public static ?Database $db = null; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Connect to the specified database. |
||
| 39 | * |
||
| 40 | * @param stdClass|null $db |
||
| 41 | * @return bool |
||
| 42 | * @throws DebugBarException |
||
| 43 | */ |
||
| 44 | public static function connectDb(stdClass|null $db = null): bool |
||
| 58 |