MenuServiceFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Menu\Factory\Service;
6
7
use Category\Service\CategoryService;
8
use Interop\Container\ContainerInterface;
9
use Menu\Filter\MenuFilter;
10
use Menu\Mapper\MenuMapper;
11
use Menu\Service\MenuService;
12
use Page\Service\PageService;
13
14
class MenuServiceFactory
15
{
16
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17
    {
18
        return new MenuService(
19
            $container->get(MenuMapper::class),
20
            $container->get(MenuFilter::class),
21
            $container->get(CategoryService::class),
22
            $container->get(PageService::class)
23
        );
24
    }
25
}
26