1 | <?php |
||
18 | class TaxModifier extends PriceModifier |
||
19 | { |
||
20 | /** |
||
21 | * Set the tax rate as a percentage |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | private static $tax_rate = '21'; |
||
|
|||
26 | |||
27 | /** |
||
28 | * Set if the tax rate is inclusive or exclusive |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private static $inclusive = false; |
||
33 | |||
34 | /** |
||
35 | * Set the default sort value to a large int so it always shows and calculates as last |
||
36 | * |
||
37 | * @var array |
||
38 | */ |
||
39 | private static $defaults = array( |
||
40 | 'Title' => 'Tax modifier', |
||
41 | 'Sort' => 9999 |
||
42 | ); |
||
43 | |||
44 | public function updateTotal(&$total) { |
||
52 | |||
53 | /** |
||
54 | * Show the used tax rate in the table title |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | public function getTableTitle() |
||
69 | |||
70 | /** |
||
71 | * Show the calculated tax value as a positive value |
||
72 | * |
||
73 | * @return float |
||
74 | */ |
||
75 | public function getTableValue() |
||
79 | |||
80 | /** |
||
81 | * Create a tax modifier if it does not already exists |
||
82 | * |
||
83 | * @param Reservation $reservation |
||
84 | * |
||
85 | * @return TaxModifier|\DataObject|null|static |
||
86 | */ |
||
87 | public static function findOrMake(Reservation $reservation) |
||
96 | } |
||
97 |
This check marks private properties in classes that are never used. Those properties can be removed.