Completed
Push — master ( 8f0e3c...ccf2cd )
by Dmitry
02:53
created

Entity   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getRepository() 0 4 1
A save() 0 4 1
1
<?php
2
3
namespace Tarantool\Mapper;
4
5
class Entity
6
{
7
    private $_repository;
8
9
    public function __construct(Repository $repository)
10
    {
11
        $this->_repository = $repository;
12
    }
13
14
    public function getRepository()
15
    {
16
        return $this->_repository;
17
    }
18
19
    public function save()
20
    {
21
        $this->getRepository()->save($this);
22
    }
23
}
24