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