VideoFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 10 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