PermissionHistoryRepositoryFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace SlayerBirden\DataFlowServer\Authorization\Factory;
5
6
use Interop\Container\ContainerInterface;
7
use SlayerBirden\DataFlowServer\Authorization\Entities\History;
8
use SlayerBirden\DataFlowServer\Doctrine\Persistence\EntityManagerRegistry;
9
use Zend\ServiceManager\Factory\FactoryInterface;
10
11
final class PermissionHistoryRepositoryFactory implements FactoryInterface
12
{
13
    /**
14
     * @inheritdoc
15
     */
16 2
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
17
    {
18
        /** @var EntityManagerRegistry $manager */
19 2
        $manager = $container->get(EntityManagerRegistry::class);
20
21 2
        return $manager->getRepository(History::class);
22
    }
23
}
24