Failed Conditions
Push — master ( 379085...b45ed5 )
by Marco
54s queued 28s
created

Driver   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Test Coverage

Coverage 57.14%

Importance

Changes 0
Metric Value
wmc 5
eloc 10
dl 0
loc 45
ccs 8
cts 14
cp 0.5714
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getDatabasePlatform() 0 3 1
A createDatabasePlatformForVersion() 0 3 1
A getSchemaManager() 0 3 1
A connect() 0 7 1
A getName() 0 3 1
1
<?php
2
3
namespace Doctrine\DBAL\Driver\DrizzlePDOMySql;
4
5
use Doctrine\DBAL\Platforms\DrizzlePlatform;
6
use Doctrine\DBAL\Schema\DrizzleSchemaManager;
7
8
/**
9
 * Drizzle driver using PDO MySql.
10
 */
11
class Driver extends \Doctrine\DBAL\Driver\PDOMySql\Driver
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
17
    {
18
        return new Connection(
19
            $this->constructPdoDsn($params),
20
            $username,
21
            $password,
22
            $driverOptions
23
        );
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29 19
    public function createDatabasePlatformForVersion($version)
30
    {
31 19
        return $this->getDatabasePlatform();
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 38
    public function getDatabasePlatform()
38
    {
39 38
        return new DrizzlePlatform();
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 19
    public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
46
    {
47 19
        return new DrizzleSchemaManager($conn);
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 19
    public function getName()
54
    {
55 19
        return 'drizzle_pdo_mysql';
56
    }
57
}
58