Failed Conditions
Push — master ( 34a070...6c283c )
by Adrien
05:56
created

ImageFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Action;
6
7
use Application\Model\Image;
8
use Application\Service\ImageResizer;
9
use Doctrine\ORM\EntityManager;
10
use Interop\Container\ContainerInterface;
11
12
class ImageFactory
13
{
14
    public function __invoke(ContainerInterface $container)
15
    {
16
        $entityManager = $container->get(EntityManager::class);
17
        $imageService = $container->get(ImageResizer::class);
18
19
        return new ImageAction($entityManager->getRepository(Image::class), $imageService);
20
    }
21
}
22