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