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

TacticianCommandBusPluginFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 3
crap 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