LegacyControllerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 15
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
1
<?php
2
3
namespace MaglLegacyApplication\Factory;
4
5
use Interop\Container\ContainerInterface;
6
use Laminas\ServiceManager\Factory\FactoryInterface;
7
use MaglLegacyApplication\Application\MaglLegacy;
8
use MaglLegacyApplication\Controller\LegacyController;
9
10
class LegacyControllerFactory implements FactoryInterface
11
{
12
13
    /**
14
     * @inheritDoc
15
     */
16 8
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17
    {
18 8
        $options = $container->get('MaglLegacyApplicationOptions');
19
20 8
        $legacyApp = MaglLegacy::getInstance();
21
22 8
        return new LegacyController($options, $legacyApp);
23
    }
24
}
25