Conditions | 6 |
Paths | 6 |
Total Lines | 22 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 3 |
CRAP Score | 21.1875 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | 3 | public function getRelatedPartyAccount(SimpleXMLElement $xmlRelatedPartyTypeAccount) |
|
16 | { |
||
17 | 3 | if (false === isset($xmlRelatedPartyTypeAccount->Id)) { |
|
18 | 3 | return; |
|
19 | } |
||
20 | |||
21 | if (isset($xmlRelatedPartyTypeAccount->Id->IBAN)) { |
||
22 | return new DTO\IbanAccount(new Iban((string) $xmlRelatedPartyTypeAccount->Id->IBAN)); |
||
23 | } |
||
24 | |||
25 | if (isset($xmlRelatedPartyTypeAccount->Id->BBAN)) { |
||
26 | return new DTO\BBANAccount((string) $xmlRelatedPartyTypeAccount->Id->BBAN); |
||
27 | } |
||
28 | |||
29 | if (isset($xmlRelatedPartyTypeAccount->Id->UPIC)) { |
||
30 | return new DTO\UPICAccount((string) $xmlRelatedPartyTypeAccount->Id->UPIC); |
||
31 | } |
||
32 | |||
33 | if (isset($xmlRelatedPartyTypeAccount->Id->PrtryAcct)) { |
||
34 | return new DTO\ProprietaryAccount((string) $xmlRelatedPartyTypeAccount->Id->PrtryAcct->Id); |
||
35 | } |
||
36 | } |
||
37 | } |
||
38 |