AbstractRepository   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 35
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A persist() 0 4 1
A flush() 0 4 1
A remove() 0 4 1
A getEntityManager() 0 4 1
1
<?php
2
3
namespace Rottenwood\KingdomBundle\Entity\Infrastructure;
4
5
use Doctrine\ORM\EntityManager;
6
use Doctrine\ORM\EntityRepository;
7
8
/** {@inheritDoc} */
9
class AbstractRepository extends EntityRepository
10
{
11
12
    /**
13
     * @param object $entity
14
     */
15
    public function persist($entity)
16
    {
17
        $this->_em->persist($entity);
18
    }
19
20
    /**
21
     * @param object|null $entity
22
     */
23
    public function flush($entity = null)
24
    {
25
        $this->_em->flush($entity);
26
    }
27
28
    /**
29
     * @param object $entity
30
     */
31
    public function remove($entity)
32
    {
33
        $this->_em->remove($entity);
34
    }
35
36
    /**
37
     * @return EntityManager
38
     */
39
    public function getEntityManager()
40
    {
41
        return $this->_em;
42
    }
43
}
44