Completed
Push — master ( fb8d74...ff1e54 )
by Sébastien
02:09
created

PdoSqliteConnection::getHost()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
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 7
    public function __construct(AdapterInterface $adapter, PDO $resource)
30
    {
31 7
        $this->adapter = $adapter;
32 7
        $this->resource = $resource;
33 7
    }
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
    {
49 1
        return $this->resource;
50
    }
51
52
    /**
53
     * {@inheritdoc}
54
     */
55 1
    public function getHost()
56
    {
57 1
        return "localhost";
58
    }
59
}
60