CookieServiceFactory::createService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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