Conditions | 4 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
99 | public static function fromArray(array $info) |
||
100 | { |
||
101 | if (!empty($info['seller_id']) && !empty($info['seller'])) { |
||
102 | $seller = new static($info['seller_id'], $info['seller']); |
||
103 | } else { |
||
104 | $seller = null; |
||
105 | } |
||
106 | |||
107 | return new static( |
||
108 | $info['id'], |
||
109 | $info['login'], |
||
110 | $seller, |
||
111 | isset($info['state']) ? CustomerState::from($info['state']) : null, |
||
112 | ); |
||
120 |