Connection   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A open() 0 7 1
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Sqlite\Db\Pdo;
4
5
use Lagdo\DbAdmin\Driver\Db\Pdo\Connection as PdoConnection;
6
use Lagdo\DbAdmin\Driver\Sqlite\Db\ConfigTrait;
7
8
class Connection extends PdoConnection
9
{
10
    use ConfigTrait;
11
12
    /**
13
     * @inheritDoc
14
     */
15
    public function open(string $database, string $schema = '')
16
    {
17
        $options = $this->driver->options();
18
        $filename = $this->filename($database, $options);
19
        $this->dsn("sqlite:$filename", '', '');
20
        $this->query('PRAGMA foreign_keys = 1');
21
        return true;
22
    }
23
}
24