| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 4 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | 3 | public function addToContainer(Container $c): void |
|
| 21 | { |
||
| 22 | 3 | if (!$c->has(PersonService::class)) { |
|
| 23 | 1 | $personPackage = new PersonPackage(); |
|
| 24 | 1 | $personPackage->addToContainer($c); |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | $entityManager = $c->get(EntityManager::class); |
|
| 28 | 3 | $personService = $c->get(PersonService::class); |
|
| 29 | 3 | $userService = new UserService($entityManager, $personService); |
|
| 30 | 3 | $c[UserService::class] = $userService; |
|
| 31 | } |
||
| 53 |