Completed
Pull Request — 1.x (#627)
by Dylan
08:40
created

Db   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 8 1
1
<?php
2
3
namespace ZfcUser\Factory\Authentication\Storage;
4
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
use ZfcUser\Authentication\Storage\Db as DbStorage;
8
use ZfcUser\Mapper\UserInterface;
9
10
class Db implements FactoryInterface
11
{
12
    /**
13
     * Create service
14
     *
15
     * @param ServiceLocatorInterface $serviceLocator
16
     * @return mixed
17
     */
18
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        /** @var UserInterface $mapper */
21
        $mapper = $serviceLocator->get('zfcuser_user_mapper');
22
        return new DbStorage(
23
            $mapper
24
        );
25
    }
26
}
27