| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 1.0527 |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function addToContainer(Container $c) |
||
| 15 | { |
||
| 16 | 6 | $function = function($c){ |
|
| 17 | /** @var \Doctrine\ORM\EntityManager $em */ |
||
| 18 | 6 | $em = $c['doctrine.entity_manager']; |
|
| 19 | /** @var \Del\Expenses\Repository\EntryRepository $repository */ |
||
| 20 | 6 | $repository = $em->getRepository('Del\Expenses\Entity\Entry'); |
|
| 21 | 6 | $svc = new ExpensesService($repository); |
|
| 22 | 6 | return $svc; |
|
| 23 | }; |
||
| 24 | |||
| 25 | $c['service.expenses'] = $c->factory($function); |
||
| 26 | } |
||
| 27 | |||
| 44 | } |