Completed
Pull Request — master (#8)
by
unknown
15:43
created

InMemoryLocatorFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
namespace TacticianModule\Factory;
3
4
use Interop\Container\ContainerInterface;
5
use League\Tactician\Handler\Locator\InMemoryLocator;
6
use Zend\ServiceManager\Factory\FactoryInterface;
7
8
class InMemoryLocatorFactory implements FactoryInterface
9
{
10
    /**
11
     * Create service
12
     *
13
     * @param ContainerInterface $container
14
     * @param string $requestedName
15
     * @param array $options
16 1
     * @return InMemoryLocator
17
     */
18 1
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
19
    {
20 1
        $handlerMap = $container->get('config')['tactician']['handler-map'];
21
22
        return new InMemoryLocator($handlerMap);
23
    }
24
}
25