AuthenticationService   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
A createService() 0 4 1
1
<?php
2
3
namespace LmcUser\Factory;
4
5
use Interop\Container\ContainerInterface;
6
use Laminas\ServiceManager\Factory\FactoryInterface;
7
use Laminas\ServiceManager\ServiceLocatorInterface;
8
9
class AuthenticationService implements FactoryInterface
10
{
11
    public function __invoke(ContainerInterface $serviceLocator, $requestedName, array $options = null)
12
    {
13
        return new \Laminas\Authentication\AuthenticationService(
14
            $serviceLocator->get('LmcUser\Authentication\Storage\Db'),
15
            $serviceLocator->get('LmcUser\Authentication\Adapter\AdapterChain')
16
        );
17
    }
18
19
    /**
20
     * Create service
21
     *
22
     * @param  ServiceLocatorInterface $serviceLocator
23
     * @return mixed
24
     */
25
    public function createService(ServiceLocatorInterface $serviceLocator)
26
    {
27
        return $this->__invoke($serviceLocator, null);
28
    }
29
}
30