ProxyFilterManagerFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 80%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 16
ccs 4
cts 5
cp 0.8
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 10 2
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Zend\InputFilter;
5
6
use Interop\Container\ContainerInterface;
7
use Zend\ServiceManager\Exception\ServiceNotFoundException;
8
use Zend\ServiceManager\Factory\FactoryInterface;
9
10
final class ProxyFilterManagerFactory implements FactoryInterface
11
{
12
    /**
13
     * @inheritdoc
14
     */
15 74
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
16
    {
17 74
        $filters = $container->get('InputFilterManager');
18
19 74
        if ($filters) {
20 74
            return $filters->get($requestedName);
21
        }
22
23
        throw new ServiceNotFoundException(sprintf('Could not identify input filter by the name %s.', $requestedName));
24
    }
25
}
26