PageServiceFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 10 1
1
<?php
2
3
namespace Columnis\Service\Factory;
4
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
use Columnis\Service\PageService;
8
9
class PageServiceFactory implements FactoryInterface
10
{
11
12
    /**
13
     * {@inheritDoc}
14
     *
15
     * @return PageService
16
     */
17 4
    public function createService(ServiceLocatorInterface $serviceLocator)
18
    {
19 4
        $templateService = $serviceLocator->get('Columnis\Service\TemplateService');
20
        /* @var \Columnis\Service\TemplateService $templateService */
21
        
22 4
        $apiService = $serviceLocator->get('Columnis\Service\ApiService');
23
        /* @var \Columnis\Service\ApiService $apiService */
24
25 4
        return new PageService($templateService, $apiService);
26
    }
27
}
28