Failed Conditions
Pull Request — master (#3650)
by Matthew
68:08 queued 64:54
created

Driver   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 72.72%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 10
dl 0
loc 47
ccs 8
cts 11
cp 0.7272
rs 10
c 1
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A createDatabasePlatformForVersion() 0 3 1
A getSchemaManager() 0 3 1
A connect() 0 7 1
A getName() 0 3 1
A getDatabasePlatform() 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 81
    public function createDatabasePlatformForVersion($version)
30
    {
31 81
        return $this->getDatabasePlatform();
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37 81
    public function getDatabasePlatform()
38
    {
39 81
        return new DrizzlePlatform();
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 27
    public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
46
    {
47 27
        return new DrizzleSchemaManager($conn);
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     *
53
     * @deprecated
54
     */
55 108
    public function getName()
56
    {
57 108
        return 'drizzle_pdo_mysql';
58
    }
59
}
60