| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | * |
||
| 8 | * @package WPB |
||
| 9 | * @subpackage WPB/src/Database |
||
| 10 | */ |
||
| 11 | |||
| 12 | namespace WPB\Database; |
||
| 13 | |||
| 14 | use Illuminate\Database\Capsule\Manager as Capsule; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The Database class. |
||
| 18 | * |
||
| 19 | * @since 1.0.0 |
||
| 20 | * @package WPB |
||
| 21 | * @subpackage WPB/src/Database |
||
| 22 | * @author Md Abu Ahsan basir <[email protected]> |
||
| 23 | */ |
||
| 24 | class DB extends Capsule { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The database instance. |
||
| 28 | * |
||
| 29 | * @since 1.0.0 |
||
| 30 | * @access protected |
||
| 31 | * @var \WPB\Database\DB $instance The database instance. |
||
| 32 | */ |
||
| 33 | protected static $instance = false; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Return database instance. |
||
| 37 | * |
||
| 38 | * @since 1.0.0 |
||
| 39 | * @access public |
||
| 40 | * |
||
| 41 | * @return null|\WPB\Database\DB |
||
| 42 | */ |
||
| 43 | public static function instance() { |
||
| 84 |