Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1.1715 |
Changes | 0 |
1 | <?php |
||
17 | 26 | public function addToContainer(Container $c): void |
|
18 | { |
||
19 | $personPackage = new PersonPackage(); |
||
20 | $personPackage->addToContainer($c); |
||
21 | |||
22 | $function = function (Container $c) { |
||
23 | 26 | $entityManager = $c->get(EntityManager::class); |
|
24 | 26 | $personService = $c->get(PersonService::class); |
|
25 | |||
26 | 26 | return new UserService($entityManager, $personService); |
|
27 | }; |
||
28 | |||
29 | $c[UserService::class] = $c->factory($function); |
||
30 | } |
||
31 | |||
42 |