CookieServiceFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 8 1
A createService() 0 4 1
1
<?php
2
3
namespace JwPersistentUser\Service;
4
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
use Interop\Container\ContainerInterface;
8
9
class CookieServiceFactory implements FactoryInterface
0 ignored issues
show
Deprecated Code introduced by
The interface Zend\ServiceManager\FactoryInterface has been deprecated with message: Use Zend\ServiceManager\Factory\FactoryInterface instead.

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
10
{
11
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
12
    {
13
        $service = new CookieService;
14
15
        $service->setModuleOptions($container->get('JwPersistentUser\ModuleOptions'));
16
17
        return $service;
18
    }
19
20
    public function createService(ServiceLocatorInterface $serviceLocator)
21
    {
22
        return $this($serviceLocator->getServiceLocator(), 'JwPersistentUser\Service\Cookie');
23
    }
24
}
25