Conditions | 3 |
Paths | 3 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
25 | 143 | public function getFormatFromClearing(AccountNumber $account): FormatInterface |
|
26 | { |
||
27 | 143 | foreach ($this->formats as $format) { |
|
28 | 142 | if ($format->isValidClearing($account)) { |
|
29 | 142 | return $format; |
|
30 | } |
||
31 | } |
||
32 | |||
33 | 1 | throw new InvalidClearingNumberException("Unknown clearing number: '{$account->getClearingNumber()}'"); |
|
34 | } |
||
35 | } |
||
36 |