Passed
Push — master ( 7d3861...c0cfa7 )
by Radu
01:22
created

PgsqlPdoDatabase::getDataSourceName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 3
1
<?php
2
namespace WebServCo\Framework\Libraries;
3
4
final class PgsqlPdoDatabase extends \WebServCo\Framework\AbstractPdoDatabase implements
5
    \WebServCo\Framework\Interfaces\DatabaseInterface
6
{
7
    use \WebServCo\Framework\Traits\PgsqlDatabaseTrait;
8
9
    protected function getDataSourceName($host, $port, $dbname)
10
    {
11
        return sprintf(
12
            '%s:host=%s;port=%s;dbname=%s',
13
            'pgsql',
14
            $host,
15
            $port,
16
            $dbname
17
        );
18
    }
19
}
20