Repository::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace PRReviewWatcher\Entity;
4
5
use Doctrine\DBAL\Connection;
6
7
class Repository
8
{
9
    protected $db;
10
11
    public function __construct(Connection $db)
12
    {
13
        $this->db = $db;
14
    }
15
16
    protected function getDb()
17
    {
18
        return $this->db;
19
    }
20
21
    protected function buildDomainObject($row)
22
    {
23
    }
24
25
    public function close()
26
    {
27
        $this->db->close();
28
    }
29
30
    public function __destruct()
31
    {
32
        $this->close();
33
    }
34
}
35