Passed
Push — fix-phpdoc-more-test ( 64adc8 )
by Wilmer
04:53 queued 44s
created

Dsn::__construct()   A

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
c 1
b 1
f 1
nc 1
nop 5
dl 0
loc 8
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Pgsql;
6
7
use Yiisoft\Db\Connection\AbstractDsn;
8
9
/**
10
 * The Dsn class is typically used to parse a DSN string, which is a string that contains all the necessary information
11
 * to connect to a database SQL Server, such as the database driver, host, database name, port, options.
12
 *
13
 * It also allows you to access individual components of the DSN, such as the driver, host, database name or port.
14
 *
15
 * @link https://www.php.net/manual/en/ref.pdo-pgsql.connection.php
16
 */
17
final class Dsn extends AbstractDsn
18
{
19
    /**
20
     * @psalm-param string[] $options
21
     */
22 650
    public function __construct(
23
        private string $driver,
24
        private string $host,
25
        private string $databaseName,
26
        private string $port = '5432',
27
        private array $options = []
28
    ) {
29 650
        parent::__construct($driver, $host, $databaseName, $port, $options);
30
    }
31
}
32