1 | <?php |
||
8 | class Rounder |
||
9 | { |
||
10 | const NONE = 'none'; |
||
11 | const POUND = 'pound'; |
||
12 | const POUND_UP = 'pound-up'; |
||
13 | const POUND_DOWN = 'pound-down'; |
||
14 | const FIFTY = 'fifty'; |
||
15 | const FIFTY_UP = 'fifty_up'; |
||
16 | const FIFTY_DOWN = 'fifty_down'; |
||
17 | |||
18 | /** |
||
19 | * Round price based on configuration settings |
||
20 | * |
||
21 | * @param string $roundingRule |
||
22 | * @param float $number |
||
23 | * @return float |
||
24 | */ |
||
25 | 8 | public function round($roundingRule, $number) |
|
56 | |||
57 | /** |
||
58 | * Get rounding rules available. |
||
59 | * |
||
60 | * @return array |
||
61 | */ |
||
62 | 1 | public function getRoundingRules() |
|
74 | } |
||
75 |