Conditions | 2 |
Paths | 4 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function fromArray(array $data) |
||
43 | { |
||
44 | try { |
||
45 | $this->object = $this->class->newInstanceWithoutConstructor(); |
||
46 | foreach ($data as $attribute => $value) { |
||
47 | $this->setter->call($this->object, $attribute, $value); |
||
48 | } |
||
49 | return $this->object; |
||
50 | } finally { |
||
51 | $this->object = null; |
||
52 | } |
||
60 |