| Conditions | 7 |
| Paths | 6 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 17 | public function add($searchResult) |
||
| 18 | { |
||
| 19 | if (is_array($searchResult)) { |
||
| 20 | if (isset($searchResult['model'])) |
||
| 21 | $this->collection[] = MarketModel::getInstance($searchResult['model']); |
||
| 22 | |||
| 23 | if (isset($searchResult['offer'])) |
||
| 24 | $this->collection[] = new Offer($searchResult['offer']); |
||
| 25 | |||
| 26 | } elseif (is_object($searchResult) && ($searchResult instanceof MarketModel || $searchResult instanceof Offer)) { |
||
| 27 | $this->collection[] = $searchResult; |
||
| 28 | } |
||
| 29 | |||
| 30 | return $this; |
||
| 31 | } |
||
| 32 | |||
| 43 |