InteractiveAuthFactory::createService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
rs 9.6666
cc 1
eloc 4
nc 1
nop 1
1
<?php
2
namespace T4web\Authentication\Service;
3
4
use Zend\ServiceManager\ServiceLocatorInterface;
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\Session\SessionManager;
7
8
class InteractiveAuthFactory implements FactoryInterface
9
{
10
    /**
11
     * Create service
12
     *
13
     * @param ServiceLocatorInterface $serviceLocator
14
     * @return InteractiveAuth
15
     */
16
    public function createService(ServiceLocatorInterface $serviceLocator)
17
    {
18
        /** @var $authService Authenticator */
19
        $authService = $serviceLocator->get('T4web\Authentication\Service\Authenticator');
20
        /** @var $sessionManager SessionManager */
21
        $sessionManager = $serviceLocator->get('Zend\Session\SessionManager');
22
23
        return new InteractiveAuth($authService, $sessionManager);
24
    }
25
}
26