PdoSqliteConnection::getHost()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
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
     * @var AdapterInterface
12
     */
13
    protected $adapter;
14
15
    /**
16
     * @var \PDO
17
     */
18
    protected $resource;
19
20
    /**
21
     * @param AdapterInterface $adapter
22
     * @param \PDO             $resource
23
     */
24 7
    public function __construct(AdapterInterface $adapter, PDO $resource)
25
    {
26 7
        $this->adapter = $adapter;
27 7
        $this->resource = $resource;
28 7
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33 1
    public function getCurrentSchema()
34
    {
35 1
        return 'main';
36
    }
37
38
    /**
39
     * {@inheritdoc}
40
     *
41
     * @return \PDO
42
     */
43 1
    public function getResource()
44
    {
45 1
        return $this->resource;
46
    }
47
48
    /**
49
     * {@inheritdoc}
50
     */
51 1
    public function getHost()
52
    {
53 1
        return 'localhost';
54
    }
55
}
56