IndexControllerFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
3
namespace Application\Controller\Factory;
4
5
use Laminas\ServiceManager\Factory\FactoryInterface;
6
use Interop\Container\ContainerInterface;
7
use Application\Controller\IndexController;
8
use Application\Service\BotParserCache;
9
10
class IndexControllerFactory implements FactoryInterface
11
{
12
    public function __invoke(
13
        ContainerInterface $container,
14
        $requestedName,
15
        array $options = null
16
    ) {
17
        $config = $container->get('configuration');
18
        $config = $config['idlerpg'];
19
20
        $parser = $container->get(BotParserCache::class);
21
22
        return new IndexController($config, $parser);
23
    }
24
}
25