Completed
Branch master (3a823b)
by Derek Stephen
04:04 queued 02:12
created

UserPackage   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 29
ccs 14
cts 14
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A addToContainer() 0 12 1
A getEntityPath() 0 4 1
A hasEntityPath() 0 4 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 22
    public function addToContainer(Container $c)
17
    {
18 22
        $personPackage = new PersonPackage();
19 22
        $personPackage->addToContainer($c);
20
21 22
        $function = function ($c) {
22 22
            $svc = new UserService($c);
23 22
            return $svc;
24 22
        };
25
26 22
        $c['service.user'] = $c->factory($function);
27 22
    }
28
29 22
    public function getEntityPath()
30 22
    {
31 22
        return 'vendor/delboy1978uk/user/src/Entity';
32
    }
33
34 22
    public function hasEntityPath()
35
    {
36 22
        return true;
37
    }
38
39
}