| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest; |
||
| 48 | 6 | public function findByIdentifier(RestRequest $request) |
|
| 49 | { |
||
| 50 | 6 | if (null === ($entity = $this->find($request->getId()))) { |
|
| 51 | 1 | throw EntityNotFoundException::fromClassNameAndIdentifier( |
|
| 52 | 1 | $this->getClassName(), |
|
| 53 | 1 | ['id' => $request->getId()] |
|
| 54 | ); |
||
| 55 | } |
||
| 56 | |||
| 57 | 5 | return $entity; |
|
| 58 | } |
||
| 60 |