PhingServiceFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
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 18
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 9 1
1
<?php
2
3
namespace BsbPhingService\Service\Factory;
4
5
use BsbPhingService\Options\PhingOptions;
6
use BsbPhingService\Options\ServiceOptions;
7
use BsbPhingService\Service\PhingService;
8
use Zend\ServiceManager\FactoryInterface;
9
use Zend\ServiceManager\ServiceLocatorInterface;
10
11
class PhingServiceFactory implements FactoryInterface
12
{
13
    /**
14
     * Create service
15
     *
16
     * @param ServiceLocatorInterface $serviceLocator
17
     * @return PhingService
18
     */
19 1
    public function createService(ServiceLocatorInterface $serviceLocator)
20
    {
21
        /** @var ServiceOptions $options */
22 1
        $options = $serviceLocator->get('BsbPhingService.serviceOptions');
23
        /** @var PhingOptions $phingOptions */
24 1
        $phingOptions = $serviceLocator->get('BsbPhingService.phingOptions');
25
26 1
        return new PhingService($options, $phingOptions);
27
    }
28
}
29