ConsumerControllerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 19
c 1
b 1
f 0
wmc 1
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
1
<?php
2
3
namespace RabbitMqModule\Controller\Factory;
4
5
use Interop\Container\ContainerInterface;
6
use Interop\Container\Exception\ContainerException;
7
use RabbitMqModule\Controller\ConsumerController as Controller;
8
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
9
use Zend\ServiceManager\Exception\ServiceNotFoundException;
10
use Zend\ServiceManager\Factory\FactoryInterface;
11
12
/**
13
 * Class ConsumerControllerFactory
14
 *
15
 * @package RabbitMqModule\Controller\Factory
16
 */
17
class ConsumerControllerFactory implements FactoryInterface
18
{
19
    /**
20
     * Create an object
21
     *
22
     * @param  ContainerInterface $container
23
     * @param  string $requestedName
24
     * @param  null|array $options
25
     * @return \RabbitMqModule\Controller\ConsumerController
26
     * @throws ServiceNotFoundException if unable to resolve the service.
27
     * @throws ServiceNotCreatedException if an exception is raised when
28
     *     creating a service.
29
     * @throws ContainerException if any other error occurs
30
     */
31 7
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
32
    {
33 7
        return new Controller($container);
34
    }
35
}
36