TemplateFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 10
c 0
b 0
f 0
dl 0
loc 14
ccs 10
cts 10
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Handler;
6
7
use Application\Model\Country;
8
use Application\Model\DocumentType;
9
use Application\Model\Domain;
10
use Application\Model\Material;
11
use Application\Model\Period;
12
use Doctrine\ORM\EntityManager;
13
use Psr\Container\ContainerInterface;
14
15
class TemplateFactory
16
{
17 1
    public function __invoke(ContainerInterface $container)
18
    {
19 1
        $entityManager = $container->get(EntityManager::class);
20 1
        $site = $container->get('site');
21
22 1
        return new TemplateHandler(
23 1
            $site,
24 1
            $entityManager->getRepository(Domain::class),
25 1
            $entityManager->getRepository(Period::class),
26 1
            $entityManager->getRepository(Country::class),
27 1
            $entityManager->getRepository(Material::class),
28 1
            $entityManager->getRepository(DocumentType::class),
29 1
        );
30
    }
31
}
32