Completed
Push — master ( 515575...4e0394 )
by Vytautas
9s
created

DoctrineStorageFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
1
<?php
2
3
namespace Svycka\Settings\Storage\Factory;
4
5
use Interop\Container\ContainerInterface;
6
use Svycka\Settings\Storage\DoctrineStorage;
7
8
/**
9
 * @author Vytautas Stankus <[email protected]>
10
 * @license MIT
11
 */
12
final class DoctrineStorageFactory
13
{
14
    /**
15
     * Create service
16
     *
17
     * @param ContainerInterface $container
18
     *
19
     * @return DoctrineStorage
20
     */
21 1
    public function __invoke(ContainerInterface $container)
22
    {
23
        /** @var \Doctrine\ORM\EntityManagerInterface $entityManager */
24 1
        $entityManager = $container->get('doctrine.entitymanager.orm_default');
25
26 1
        return new DoctrineStorage($entityManager);
27
    }
28
}
29