ORMEntityRepository   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
dl 0
loc 17
rs 10
c 1
b 0
f 1
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A em() 0 3 1
A __construct() 0 3 1
A getClassName() 0 3 1
1
<?php
2
3
namespace Zenstruck\Porpaginas\Tests\Doctrine\Fixtures;
4
5
use Doctrine\ORM\EntityManagerInterface;
6
use Zenstruck\Porpaginas\Doctrine\Repository\ORMMatchableRepository;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
final class ORMEntityRepository extends ORMMatchableRepository
12
{
13
    private EntityManagerInterface $em;
14
15
    public function __construct(EntityManagerInterface $em)
16
    {
17
        $this->em = $em;
18
    }
19
20
    public function getClassName(): string
21
    {
22
        return ORMEntity::class;
23
    }
24
25
    protected function em(): EntityManagerInterface
26
    {
27
        return $this->em;
28
    }
29
}
30