Completed
Push — master ( bfe64f...050f53 )
by Dmitry
02:12
created

Entity::__debugInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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
    public function __debugInfo()
25
    {
26
        $info = get_object_vars($this);
27
        unset($info['_repository']);
28
        return $info;
29
    }
30
}
31