Completed
Push — master ( dbcbc1...04d817 )
by Sébastien
02:01
created

PdoSqliteConnection   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 44
wmc 3
lcom 0
cbo 0
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCurrentSchema() 0 4 1
A getResource() 0 3 1
1
<?php
2
3
namespace Soluble\DbWrapper\Connection;
4
5
use Soluble\DbWrapper\Adapter\AdapterInterface;
6
use PDO;
7
8
class PdoSqliteConnection implements ConnectionInterface
9
{
10
11
    /**
12
     *
13
     * @var AdapterInterface
14
     */
15
    protected $adapter;
16
    
17
    
18
    /**
19
     *
20
     * @var \PDO
21
     */
22
    protected $resource;
23
    
24
    /**
25
     * 
26
     * @param AdapterInterface $adapter
27
     * @param \PDO $resource
28
     */
29 5
    public function __construct(AdapterInterface $adapter, PDO $resource)
30
    {
31 5
        $this->adapter = $adapter;
32 5
        $this->resource = $resource;
33 5
    }
34
    
35
    /**
36
     * {@inheritdoc}
37
     */
38 1
    public function getCurrentSchema()
39
    {
40 1
        return 'main';
41
    }
42
    
43
    /**
44
     * {@inheritdoc}
45
     * @return \PDO
46
     */
47 1
    public function getResource() {
48 1
        return $this->resource;    
49
    }
50
    
51
}
52
53