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

PdoSqliteConnection::getResource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 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