Completed
Push — master ( 20d81d...6bd930 )
by Rasmus
02:25
created

MySQLDatabase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 4
dl 0
loc 19
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A createDriver() 0 4 1
1
<?php
2
3
namespace mindplay\sql\mysql;
4
5
use mindplay\sql\framework\Database;
6
use mindplay\sql\framework\Driver;
7
use mindplay\sql\types\BoolType;
8
9
class MySQLDatabase extends Database
10
{
11 1
    public function __construct()
12
    {
13 1
        parent::__construct();
14
        
15 1
        $this->container->register(BoolType::class, function () {
16 1
            return BoolType::asInt();
17 1
        });
18 1
    }
19
20
    /**
21
     * @return Driver
22
     */
23 1
    protected function createDriver()
24
    {
25 1
        return new MySQLDriver();
26
    }
27
}
28