DoctrineService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntityManager() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DH\Auditor\Provider\Doctrine\Service;
6
7
use DH\Auditor\Provider\Service\AbstractService;
8
use Doctrine\ORM\EntityManagerInterface;
9
10
abstract class DoctrineService extends AbstractService
11
{
12
    private EntityManagerInterface $entityManager;
13
14
    public function __construct(string $name, EntityManagerInterface $entityManager)
15
    {
16
        parent::__construct($name);
17
18
        $this->entityManager = $entityManager;
19
    }
20
21
    public function getEntityManager(): EntityManagerInterface
22
    {
23
        return $this->entityManager;
24
    }
25
}
26