Completed
Push — develop ( f102ca...488b09 )
by Mathias
20:12 queued 11:00
created

MongoQueueControllerFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
crap 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2019 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Core\Queue\Controller;
12
13
use Core\Queue\Worker\MongoWorker;
14
use Interop\Container\ContainerInterface;
15
use SlmQueue\Queue\QueuePluginManager;
16
use Zend\ServiceManager\Factory\FactoryInterface;
17
18
/**
19
 * Factory for \Core\Queue\Controller\MongoQueueController
20
 * 
21
 * @author Mathias Gelhausen <[email protected]>
22
 */
23
class MongoQueueControllerFactory implements FactoryInterface
24
{
25
    
26 1
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
27
    {
28 1
        $service = new MongoQueueController(
29 1
            $container->get(MongoWorker::class),
30 1
            $container->get(QueuePluginManager::class)
31
        );
32
        
33 1
        return $service;    
34
    }
35
}
36