Conditions | 6 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
78 | public function import($object) |
||
79 | { |
||
80 | parent::import($object); |
||
81 | $properties = get_object_vars($object); |
||
82 | foreach ($properties as $key => $value) { |
||
83 | if (is_array($value) && is_array($this->{$key}) && $key == 'products') { |
||
84 | $this->products = array(); |
||
85 | foreach ($value as $product) { |
||
86 | $productObject = new Product(); |
||
87 | $productObject->import($product); |
||
88 | $this->addProduct($productObject); |
||
89 | } |
||
94 |