ProxyClearControllerFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
wmc 2
lcom 0
cbo 3
ccs 5
cts 5
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 8 2
1
<?php
2
namespace mxdiModule\Factory\Controller;
3
4
use mxdiModule\Controller\ProxyClearController;
5
use Zend\ServiceManager\AbstractPluginManager;
6
use Zend\ServiceManager\FactoryInterface;
7
use Zend\ServiceManager\ServiceLocatorInterface;
8
9
class ProxyClearControllerFactory implements FactoryInterface
10
{
11
    /**
12
     * @param ServiceLocatorInterface $serviceLocator
13
     * @return ProxyClearController
14
     */
15 1
    public function createService(ServiceLocatorInterface $serviceLocator)
16
    {
17 1
        if ($serviceLocator instanceof AbstractPluginManager) {
18 1
            $serviceLocator = $serviceLocator->getServiceLocator();
19 1
        }
20
21 1
        return new ProxyClearController($serviceLocator->get('config')['mxdimodule']['proxy_dir']);
22
    }
23
}
24