UserHydratorFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 7 1
1
<?php
2
namespace ZfcUser\Factory\Mapper;
3
4
use Zend\Crypt\Password\Bcrypt;
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
use ZfcUser\Mapper;
8
9
class UserHydratorFactory implements FactoryInterface
10
{
11
    /**
12
     * {@inheritDoc}
13
     */
14
    public function createService(ServiceLocatorInterface $serviceLocator)
15
    {
16
        $options = $serviceLocator->get('zfcuser_module_options');
17
        $crypto  = new Bcrypt;
18
        $crypto->setCost($options->getPasswordCost());
19
        return new Mapper\UserHydrator($crypto);
20
    }
21
}
22