Passed
Push — master ( d38468...eb5cf9 )
by Al3x
01:39
created

ReflectionHydratorFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace InvoiceNinjaModule\Hydrator;
5
6
use Interop\Container\ContainerInterface;
7
use Laminas\Hydrator\NamingStrategy\UnderscoreNamingStrategy;
8
use Laminas\Hydrator\ReflectionHydrator;
9
use Laminas\ServiceManager\Factory\FactoryInterface;
10
11
/**
12
 * Class ReflectionHydratorFactory
13
 */
14
final class ReflectionHydratorFactory implements FactoryInterface
15
{
16
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17
    {
18
        $hydrator = new ReflectionHydrator();
19
        $hydrator->setNamingStrategy(new UnderscoreNamingStrategy());
20
        return $hydrator;
21
    }
22
}
23