Driver::createConnection()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Oracle;
6
7
use PDO;
8
use Yiisoft\Db\Driver\Pdo\AbstractPdoDriver;
9
10
/**
11
 * Implements the Oracle Server driver based on the PDO (PHP Data Objects) extension.
12
 *
13
 * @see https://www.php.net/manual/en/ref.pdo-oci.php
14
 */
15
final class Driver extends AbstractPdoDriver
16
{
17 306
    public function createConnection(): PDO
18
    {
19 306
        $this->attributes += [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION];
20 306
        return parent::createConnection();
21
    }
22
23 416
    public function getDriverName(): string
24
    {
25 416
        return 'oci';
26
    }
27
}
28