UserReminderCliControllerFactory::createService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace JhFlexiTime\Controller\Factory;
4
5
use JhFlexiTime\Controller\UserReminderCliController;
6
use Zend\ServiceManager\FactoryInterface;
7
use Zend\ServiceManager\ServiceLocatorInterface;
8
9
/**
10
 * Class UserReminderCliControllerFactory
11
 * @package JhFlexiTime\Controller\Factory
12
 * @author Aydin Hassan <[email protected]>
13
 */
14
class UserReminderCliControllerFactory implements FactoryInterface
15
{
16
    /**
17
     * @param ServiceLocatorInterface $serviceLocator
18
     * @return UserReminderCliController
19
     */
20
    public function createService(ServiceLocatorInterface $serviceLocator)
21
    {
22
        //get parent locator
23
        $serviceLocator = $serviceLocator->getServiceLocator();
24
25
        return new UserReminderCliController(
26
            $serviceLocator->get('JhFlexiTime\Service\MissingBookingReminderService'),
27
            $serviceLocator->get('Console')
28
        );
29
    }
30
}
31