StdInProducerControllerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 20
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\StdInProducerController as Controller;
8
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
9
use Zend\ServiceManager\Exception\ServiceNotFoundException;
10
use Zend\ServiceManager\Factory\FactoryInterface;
11
12
/**
13
 * Class StdInProducerController
14
 *
15
 * @package RabbitMqModule\Controller\Factory
16
 */
17
class StdInProducerControllerFactory implements FactoryInterface
18
{
19
20
    /**
21
     * Create an object
22
     *
23
     * @param  ContainerInterface $container
24
     * @param  string $requestedName
25
     * @param  null|array $options
26
     * @return \RabbitMqModule\Controller\StdInProducerController
27
     * @throws ServiceNotFoundException if unable to resolve the service.
28
     * @throws ServiceNotCreatedException if an exception is raised when
29
     *     creating a service.
30
     * @throws ContainerException if any other error occurs
31
     */
32 3
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
33
    {
34 3
        return new Controller($container);
35
    }
36
}
37