Sqlite   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 20
ccs 2
cts 2
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A open() 0 7 1
A __construct() 0 3 1
1
<?php
2
namespace Fyuze\Database\Drivers;
3
4
use PDO;
5
6
class Sqlite extends Driver
7
{
8
    /**
9
     * @param array $config
10
     */
11 7
    public function __construct(array $config = [])
12
    {
13 7
        $this->config = $config;
14
    }
15
16
    /**
17
     * @codeCoverageIgnore
18
     */
19
    public function open()
20
    {
21
        return new PDO(
22
            sprintf('sqlite:%s', $this->config['database']),
23
            null,
24
            null,
25
            $this->getOptions()
26
        );
27
    }
28
}
29