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

TacticianCommandBusPluginFactory   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 5
Bugs 0 Features 0
Metric Value
wmc 1
c 5
b 0
f 0
lcom 0
cbo 2
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
namespace TacticianModule\Factory\Controller\Plugin;
3
4
use Interop\Container\ContainerInterface;
5
use League\Tactician\CommandBus;
6
use TacticianModule\Controller\Plugin\TacticianCommandBusPlugin;
7
use Zend\ServiceManager\Factory\FactoryInterface;
8
use Zend\ServiceManager\AbstractPluginManager;
9
10
class TacticianCommandBusPluginFactory implements FactoryInterface
11
{
12
    /**
13
     * Create service
14
     *
15
     * @param ContainerInterface $pm
16
     * @param string $requestedName
17
     * @param array $options
18 2
     * @return TacticianCommandBusPlugin
19
     */
20 2
    public function __invoke(ContainerInterface $pm, $requestedName, array $options = null)
21
    {
22 1
        $commandBus = $pm->get(CommandBus::class);
23 1
24
        return new TacticianCommandBusPlugin($commandBus);
25 1
    }
26
}
27