Completed
Push — master ( 686b15...e1ff08 )
by Derek Stephen
08:48
created

UserPackage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 25%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 29
ccs 3
cts 12
cp 0.25
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getEntityPath() 0 4 1
A hasEntityPath() 0 4 1
A addToContainer() 0 12 1
1
<?php
2
3
namespace Del;
4
5
use Del\Common\Container\RegistrationInterface;
6
use Del\Person\PersonPackage;
7
use Del\Service\UserService;
8
use Doctrine\ORM\EntityManager;
9
use Pimple\Container;
10
11
class UserPackage implements RegistrationInterface
12
{
13
    /**
14
     * @param Container $c
15
     */
16 25
    public function addToContainer(Container $c)
17
    {
18
        $personPackage = new PersonPackage();
19
        $personPackage->addToContainer($c);
20
21
        $function = function ($c) {
22 25
            $svc = new UserService($c);
23 25
            return $svc;
24
        };
25
26
        $c['service.user'] = $c->factory($function);
27
    }
28
29
    public function getEntityPath()
30
    {
31
        return 'vendor/delboy1978uk/user/src/Entity';
32
    }
33
34
    public function hasEntityPath()
35
    {
36
        return true;
37
    }
38
39
}