| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 4.3731 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 16 | 2 | public function add($model) |
|
| 17 | { |
||
| 18 | 2 | if (is_array($model)) { |
|
| 19 | // @note: add model type validation. |
||
| 20 | 2 | $this->collection[] = MarketModel::getInstance($model); |
|
| 21 | 2 | } elseif (is_object($model) && $model instanceof MarketModel) { |
|
| 22 | $this->collection[] = $model; |
||
| 23 | } |
||
| 24 | |||
| 25 | 2 | return $this; |
|
| 26 | } |
||
| 27 | |||
| 38 |