Completed
Pull Request — master (#719)
by
unknown
02:11
created

DefaultServiceRepository::getEntityRepository()   A

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 0
1
<?php
2
3
/*
4
 * This file is part of the Doctrine Bundle
5
 *
6
 * The code was originally distributed inside the Symfony framework.
7
 *
8
 * (c) Fabien Potencier <[email protected]>
9
 * (c) Doctrine Project, Benjamin Eberlei <[email protected]>
10
 *
11
 * For the full copyright and license information, please view the LICENSE
12
 * file that was distributed with this source code.
13
 */
14
15
namespace Doctrine\Bundle\DoctrineBundle\Repository;
16
17
use Doctrine\ORM\EntityManagerInterface;
18
use Doctrine\ORM\EntityRepository;
19
20
/**
21
 * Default repository that's used for service repositories.
22
 *
23
 * @author Ryan Weaver <[email protected]>
24
 */
25
class DefaultServiceRepository implements EntityRepositoryInterface
26
{
27
    use RepositoryTrait;
28
29
    private $entityManager;
30
31
    private $className;
32
33
    public function __construct(EntityManagerInterface $entityManager, $className)
34
    {
35
        $this->entityManager = $entityManager;
36
        $this->className = $className;
37
    }
38
39
    /**
40
     * @return EntityRepository
41
     */
42
    private function getEntityRepository()
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
43
    {
44
        return $this->entityManager->getRepository($this->getClassName());
45
    }
46
}
47