Dsn::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 5
dl 0
loc 8
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 1
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Mysql;
6
7
use Yiisoft\Db\Connection\AbstractDsn;
8
9
/**
10
 * Implement a Data Source Name (DSN) for an MySQL, MariaDB.
11
 *
12
 * @link https://www.php.net/manual/en/ref.pdo-mysql.connection.php
13
 */
14
final class Dsn extends AbstractDsn
15
{
16
    /**
17
     * @psalm-param string[] $options
18
     */
19 742
    public function __construct(
20
        string $driver,
21
        string $host,
22
        string|null $databaseName = null,
23
        string $port = '3306',
24
        array $options = []
25
    ) {
26 742
        parent::__construct($driver, $host, $databaseName, $port, $options);
27
    }
28
}
29