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