| 1 | <?php |
||
| 7 | class Transaction extends Model |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $table = 'point_transactions'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var array |
||
| 16 | */ |
||
| 17 | protected $guarded = ['id', 'created_at', 'updated_at']; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @return \Illuminate\Database\Eloquent\Relations\MorphTo |
||
| 21 | */ |
||
| 22 | public function pointable() |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Model $pointable |
||
| 29 | * |
||
| 30 | * @return static |
||
| 31 | */ |
||
| 32 | public function getCurrentPoints(Model $pointable) |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param Model $pointable |
||
| 49 | * @param $amount |
||
| 50 | * @param $message |
||
| 51 | * @param $data |
||
| 52 | * |
||
| 53 | * @return static |
||
| 54 | */ |
||
| 55 | public function addTransaction(Model $pointable, $amount, $message, $data = null) |
||
| 71 | } |
||
| 72 |
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.