Failed Conditions
Pull Request — develop (#3553)
by Sergei
100:55 queued 35:51
created

Driver::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Driver\Mysqli;
6
7
use Doctrine\DBAL\DBALException;
8
use Doctrine\DBAL\Driver\AbstractMySQLDriver;
9
10
class Driver extends AbstractMySQLDriver
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15 412
    public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
16
    {
17
        try {
18 412
            return new MysqliConnection($params, (string) $username, (string) $password, $driverOptions);
19 272
        } catch (MysqliException $e) {
20 272
            throw DBALException::driverException($this, $e);
21
        }
22
    }
23
}
24