| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 55 | public function addTransaction(Model $pointable, $amount, $message, $data = null) | ||
| 56 |     { | ||
| 57 | $transaction = new static(); | ||
| 58 | $transaction->amount = $amount; | ||
|  | |||
| 59 | |||
| 60 | $transaction->current = $this->getCurrentPoints($pointable) + $amount; | ||
| 61 | |||
| 62 | $transaction->message = $message; | ||
| 63 |         if ($data) { | ||
| 64 | $transaction->fill($data); | ||
| 65 | } | ||
| 66 | // $transaction->save(); | ||
| 67 | $pointable->transactions()->save($transaction); | ||
| 68 | |||
| 69 | return $transaction; | ||
| 70 | } | ||
| 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.