| 1 | <?php |
||
| 9 | class FlatTaxModifier extends TaxModifier |
||
| 10 | { |
||
| 11 | private static $name = "GST"; |
||
| 12 | |||
| 13 | private static $rate = 0.15; |
||
| 14 | |||
| 15 | private static $exclusive = true; |
||
| 16 | |||
| 17 | private static $includedmessage = "%.1f%% %s (inclusive)"; |
||
| 18 | |||
| 19 | private static $excludedmessage = "%.1f%% %s"; |
||
| 20 | |||
| 21 | 7 | public function __construct($record = null, $isSingleton = false, $model = null) |
|
| 22 | { |
||
| 23 | 7 | parent::__construct($record, $isSingleton, $model); |
|
| 24 | 7 | $this->Type = self::config()->exclusive ? 'Chargable' : 'Ignored'; |
|
|
|
|||
| 25 | 7 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Get the tax amount to charge on the order. |
||
| 29 | */ |
||
| 30 | 5 | public function value($incoming) |
|
| 40 | } |
||
| 41 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.