Conditions | 2 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 'Root.' |
||
37 | );//*/ |
||
38 | } |
||
39 | |||
40 | /** |
||
41 | * @param int $quantity |
||
42 | * @return DiscountHelper |
||
43 | */ |
||
44 | public function getBestDiscount($quantity = 1) |
||
45 | { |
||
46 | return DiscountHelper::create($this->owner, $quantity); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * @param int $quantity |
||
51 | * @return false|DBCurrency |
||
52 | */ |
||
53 | public function getDiscountPrice($quantity = 1) |
||
54 | { |
||
55 | if ($discount = $this->getBestDiscount($quantity)) { |
||
56 | return $discount->getDiscountedPrice(); |
||
57 | } |
||
74 |