IdentityFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 13 1
1
<?php
2
namespace ZfcUser\Factory\View\Helper;
3
4
use Zend\Authentication\AuthenticationService;
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
use Zend\View\HelperPluginManager;
8
use ZfcUser\View\Helper\ZfcUserIdentity;
9
10
class IdentityFactory implements FactoryInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function createService(ServiceLocatorInterface $pluginManager)
16
    {
17
        /* @var $pluginManager HelperPluginManager */
18
        $serviceManager = $pluginManager->getServiceLocator();
19
20
        /* @var $authService AuthenticationService */
21
        $authService = $serviceManager->get('zfcuser_auth_service');
22
23
        $viewHelper = new ZfcUserIdentity;
24
        $viewHelper->setAuthService($authService);
25
26
        return $viewHelper;
27
    }
28
}
29