| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function getByExternalReference(string $externalReference): ChargeBack |
||
| 32 | { |
||
| 33 | $chargeBack = $this->entityRepository->findOneBy(['externalReference' => $externalReference]); |
||
| 34 | |||
| 35 | if (!$chargeBack instanceof ChargeBack) { |
||
| 36 | throw new NoEntityFoundException(sprintf("Can't find charge back for '%s'", $externalReference)); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $chargeBack; |
||
| 40 | } |
||
| 42 |