BookingRepositoryFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 6 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