Repository   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDb() 0 4 1
A buildDomainObject() 0 3 1
A close() 0 4 1
A __destruct() 0 4 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