Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
47 | 2 | public static function createFromArray(array $data) |
|
48 | { |
||
49 | 2 | $invoiceAddress = new self(); |
|
50 | 2 | $invoiceAddress->careOf = $data['careof'] ?? null; |
|
51 | 2 | $invoiceAddress->streetAddress = $data['street_address'] ?? null; |
|
52 | 2 | $invoiceAddress->zipCode = $data['zipcode'] ?? null; |
|
53 | 2 | $invoiceAddress->city = $data['city'] ?? null; |
|
54 | 2 | $invoiceAddress->country = $data['country'] ?? null; |
|
55 | 2 | $invoiceAddress->email = $data['email'] ?? null; |
|
56 | |||
57 | 2 | return $invoiceAddress; |
|
58 | } |
||
59 | |||
73 |