VideoFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Article\Factory\Controller;
6
7
use Article\Controller\VideoController;
8
use Article\Service\VideoService;
9
use Category\Service\CategoryService;
10
use Interop\Container\ContainerInterface;
11
use Zend\Expressive\Router\RouterInterface;
12
use Zend\Expressive\Template\TemplateRendererInterface;
13
14
class VideoFactory
15
{
16
    public function __invoke(ContainerInterface $container) : VideoController
17
    {
18
        return new VideoController(
19
            $container->get(TemplateRendererInterface::class),
20
            $container->get(RouterInterface::class),
21
            $container->get(VideoService::class),
22
            $container->get('session'),
23
            $container->get(CategoryService::class)
24
        );
25
    }
26
}
27