BookingRepositoryFactory::createService()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
namespace JhFlexiTime\Repository\Factory;
3
 
4
use JhFlexiTime\Repository\BookingRepository;
5
use Zend\ServiceManager\FactoryInterface;
6
use Zend\ServiceManager\ServiceLocatorInterface;
7
 
8
/**
9
 * Booking repository Factory
10
 * 
11
 * @author Ben Lill <[email protected]>
12
 */
13
class BookingRepositoryFactory implements FactoryInterface
14
{
15
    /**
16
     * @param \Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
17
     * @return \JhFlexiTime\Repository\BookingRepository
18
     */
19
    public function createService(ServiceLocatorInterface $serviceLocator)
20
    {
21
        return new BookingRepository(
22
            $serviceLocator->get('JhFlexiTime\ObjectManager')->getRepository('JhFlexiTime\Entity\Booking')
23
        );
24
    }
25
}
26