Passed
Branch ops-updates (277b44)
by Björn
05:09
created

SystemControllerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 13
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 4 1
1
<?php
2
namespace Application\Factory;
3
4
use Application\Controller\SystemController;
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
8
class SystemControllerFactory implements FactoryInterface
9
{
10
    /**
11
     * Create service
12
     *
13
     * @param ServiceLocatorInterface $serviceLocator
14
     *
15
     * @return mixed
16
     */
17
    public function createService(ServiceLocatorInterface $serviceLocator)
18
    {
19
        $realServiceLocator = $serviceLocator->getServiceLocator();
0 ignored issues
show
Bug introduced by
The method getServiceLocator() does not exist on Zend\ServiceManager\ServiceLocatorInterface. It seems like you code against a sub-type of Zend\ServiceManager\ServiceLocatorInterface such as Zend\ServiceManager\AbstractPluginManager. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        /** @scrutinizer ignore-call */ 
20
        $realServiceLocator = $serviceLocator->getServiceLocator();
Loading history...
20
        return new SystemController($realServiceLocator);
21
    }
22
}