Completed
Push — feature/middleware ( a35412...bb427e )
by Derek Stephen
03:50
created

DragonPackage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addToContainer() 0 6 1
A getEntityPath() 0 4 1
A hasEntityPath() 0 4 1
1
<?php
2
3
namespace BoneMvc\Module\Dragon;
4
5
use BoneMvc\Module\Dragon\Service\DragonService;
6
use Del\Common\Container\RegistrationInterface;
7
use Doctrine\ORM\EntityManager;
8
use Pimple\Container;
9
10
class DragonPackage implements RegistrationInterface
11
{
12
    /**
13
     * @param Container $c
14
     */
15
    public function addToContainer(Container $c)
16
    {
17
        /** @var EntityManager $em */
18
        $em = $c['doctrine.entity_manager'];
19
        $c['service.Dragon'] = new DragonService($em);
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getEntityPath()
26
    {
27
        return 'build/5cef402a1337d/src/Dragon/Entity';
28
    }
29
30
    /**
31
     * @return bool
32
     */
33
    public function hasEntityPath()
34
    {
35
        return true;
36
    }
37
}
38