Passed
Push — master ( 240c83...03f39b )
by Mathias
06:41
created

UploadHandlerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Applications\Service;
6
7
8
use Applications\Entity\Application;
9
use Core\Service\FileManager;
10
use Doctrine\ODM\MongoDB\DocumentManager;
11
use Psr\Container\ContainerInterface;
12
13
class UploadHandlerFactory
14
{
15
    public function __invoke(ContainerInterface $container): UploadHandler
16
    {
17
        $dm = $container->get(DocumentManager::class);
18
        $fileManager = $container->get(FileManager::class);
19
        $appRepo = $dm->getRepository(Application::class);
20
21
        return new UploadHandler($dm, $fileManager, $appRepo);
22
    }
23
}