Completed
Push — master ( 0dd465...6962ca )
by Derek Stephen
09:52 queued 07:55
created

Person   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 0
Metric Value
wmc 2
c 5
b 0
f 0
lcom 1
cbo 2
dl 0
loc 21
ccs 8
cts 8
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A save() 0 6 1
A delete() 0 5 1
1
<?php
2
3
namespace Del\Repository;
4
5
use Del\Entity\Person as PersonEntity;
6
use Doctrine\ORM\EntityRepository;
7
8
class Person extends EntityRepository
9
{
10
    /**
11
     * @param PersonEntity $person
12
     * @return PersonEntity
13
     */
14 2
    public function save(PersonEntity $person)
15
    {
16 2
        $this->_em->persist($person);
17 2
        $this->_em->flush();
18 2
        return $person;
19
    }
20
    /**
21
     * @param PersonEntity $person
22
     */
23 1
    public function delete(PersonEntity $person)
24
    {
25 1
        $this->_em->remove($person);
26 1
        $this->_em->flush();
27 1
    }
28
}
29