| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 4 | public function getAction($identifier) |
|
| 42 | { |
||
| 43 | 4 | $entity = $this->repository->find($identifier); |
|
| 44 | |||
| 45 | 4 | if (!$entity) { |
|
| 46 | throw EntityNotFoundException::byIdentifier($identifier); |
||
| 47 | } |
||
| 48 | |||
| 49 | 4 | $this->evm->dispatch(CrudEvents::READ, new CollectionCrudEvent([$entity])); |
|
| 50 | |||
| 51 | 4 | return $entity; |
|
| 52 | } |
||
| 53 | } |
||
| 54 |