ConfigServiceFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createService() 0 4 1
A __invoke() 0 4 1
1
<?php
2
/*
3
 * This file is part of the Adlogix package.
4
 *
5
 * (c) Allan Segebarth <[email protected]>
6
 * (c) Jean-Jacques Courtens <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Adlogix\Zf2Rollout\Service\Factory;
13
14
15
use Interop\Container\ContainerInterface;
16
use Zend\ServiceManager\FactoryInterface;
17
use Zend\ServiceManager\ServiceLocatorInterface;
18
19
class ConfigServiceFactory implements FactoryInterface
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public function createService(ServiceLocatorInterface $serviceLocator)
25
    {
26
        return $this($serviceLocator, null);
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
33
    {
34
        return $container->get('Config')['rollout'];
35
    }
36
}