AuthenticationServiceFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
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 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 13 1
1
<?php
2
namespace ZfcUser\Factory;
3
4
use Zend\Authentication\AuthenticationService;
5
use Zend\Authentication\Adapter;
6
use Zend\Authentication\Storage;
7
use Zend\ServiceManager\FactoryInterface;
8
use Zend\ServiceManager\ServiceLocatorInterface;
9
10
class AuthenticationServiceFactory implements FactoryInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function createService(ServiceLocatorInterface $serviceLocator)
16
    {
17
        /* @var $authStorage Storage\StorageInterface */
18
        $authStorage = $serviceLocator->get('ZfcUser\Authentication\Storage\Db');
19
20
        /* @var $authAdapter Adapter\AdapterInterface */
21
        $authAdapter = $serviceLocator->get('ZfcUser\Authentication\Adapter\AdapterChain');
22
23
        return new AuthenticationService(
24
            $authStorage,
25
            $authAdapter
26
        );
27
    }
28
}
29