| Conditions | 5 | 
| Paths | 16 | 
| Total Lines | 19 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 10 | 
| CRAP Score | 5.0187 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 1 | 
| 1 | <?php  | 
            ||
| 15 | 16 | public static function createFromXml(SimpleXMLElement $xmlRecipient)  | 
            |
| 16 |     { | 
            ||
| 17 | 16 | $recipient = new DTO\Recipient();  | 
            |
| 18 | |||
| 19 | 16 |         if (isset($xmlRecipient->Nm)) { | 
            |
| 20 | 16 | $recipient->setName((string) $xmlRecipient->Nm);  | 
            |
| 21 | }  | 
            ||
| 22 | 16 |         if (isset($xmlRecipient->PstlAdr)) { | 
            |
| 23 | 16 | $recipient->setAddress(Address::createFromXml($xmlRecipient->PstlAdr));  | 
            |
| 24 | }  | 
            ||
| 25 | 16 |         if (isset($xmlRecipient->CtryOfRes)) { | 
            |
| 26 | 16 | $recipient->setCountryOfResidence((string) $xmlRecipient->CtryOfRes);  | 
            |
| 27 | }  | 
            ||
| 28 | 16 |         if (isset($xmlRecipient->CtctDtls)) { | 
            |
| 29 | $recipient->setContactDetails(ContactDetails::createFromXml($xmlRecipient->CtctDtls));  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 | 16 | return $recipient;  | 
            |
| 33 | }  | 
            ||
| 34 | }  | 
            ||
| 35 |