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