| Conditions | 4 |
| Paths | 4 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public function updateQuantity(&$quantity) |
||
| 37 | { |
||
| 38 | if (!$this->owner->getProduct()->hasMethod('getHasInventory')) { |
||
| 39 | return; |
||
| 40 | } |
||
| 41 | if (!$this->owner->getProduct()->getHasInventory()) { |
||
| 42 | return; |
||
| 43 | } |
||
| 44 | if ($quantity >= $this->owner->getProduct()->getNumberAvailable()) { |
||
| 45 | $quantity = $this->owner->getProduct()->getNumberAvailable(); |
||
| 46 | } |
||
| 64 |