1 | <?php |
||
19 | class Coupon extends Model implements DiscountContract |
||
20 | { |
||
21 | use SoftDeletes; |
||
22 | |||
23 | protected $guarded = ['id', 'orderAmountLimit']; |
||
24 | |||
25 | /** |
||
26 | * Address constructor. |
||
27 | * |
||
28 | * @param array $attributes |
||
29 | */ |
||
30 | 14 | public function __construct(array $attributes = []) |
|
36 | |||
37 | 6 | public function discount() |
|
41 | |||
42 | /** |
||
43 | * @return mixed |
||
44 | */ |
||
45 | public function hasRules() |
||
49 | |||
50 | 1 | public function isCouponBased() |
|
54 | |||
55 | 1 | public function getLabelAttribute() |
|
59 | |||
60 | public function getStartsAtAttribute() |
||
64 | |||
65 | public function getEndsAtAttribute() |
||
69 | |||
70 | 1 | public function getActions() |
|
74 | |||
75 | public function getRules() |
||
79 | |||
80 | 1 | public function setCouponUsed() |
|
85 | |||
86 | 2 | public function getStartsAt() |
|
90 | |||
91 | 2 | public function getEndsAt() |
|
99 | |||
100 | /** |
||
101 | * @return mixed |
||
102 | */ |
||
103 | public function getUsed() |
||
107 | |||
108 | /** |
||
109 | * @return mixed |
||
110 | */ |
||
111 | public function getUsageLimit() |
||
115 | } |
||
116 |
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.