AbstractRepository::flush()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 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