Passed
Push — main ( 41c72c...3c706c )
by Thierry
06:23 queued 04:49
created

Connection::nextResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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