1 | <?php |
||
7 | class TaxManager |
||
8 | { |
||
9 | /** |
||
10 | * Amount for use when calculate taxes. |
||
11 | * |
||
12 | * @var int |
||
13 | */ |
||
14 | public $amount; |
||
15 | /** |
||
16 | * List of taxes for calculate final amount. |
||
17 | * |
||
18 | * @var array |
||
19 | */ |
||
20 | public $taxes = []; |
||
21 | |||
22 | /** |
||
23 | * @param int $amount |
||
24 | */ |
||
25 | public function __construct($amount = 0) |
||
29 | |||
30 | /** |
||
31 | * @param string|FeiMx\Tax\Contracts\TaxContract $tax |
||
32 | * @param bool|string $retention |
||
33 | * |
||
34 | * @return mixed |
||
35 | */ |
||
36 | public function addTax($tax, $retention = false) |
||
49 | |||
50 | /** |
||
51 | * @param array|\ArrayAccess |
||
52 | */ |
||
53 | public function addTaxes(...$taxes) |
||
65 | |||
66 | /** |
||
67 | * Get total amount after taxes. |
||
68 | * |
||
69 | * @return float Total amount |
||
70 | */ |
||
71 | public function total() |
||
80 | |||
81 | /** |
||
82 | * Get a list of taxes with amount calculated. |
||
83 | * |
||
84 | * @return float Total amount |
||
85 | */ |
||
86 | public function get() |
||
101 | |||
102 | /** |
||
103 | * @param string $tax |
||
104 | * |
||
105 | * @return string $className |
||
106 | */ |
||
107 | public function stringToClassName($tax) |
||
116 | |||
117 | public function __get($property) |
||
129 | } |
||
130 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.