| 1 | <?php |
||
| 10 | class TopicListener |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Create the event listener. |
||
| 14 | */ |
||
| 15 | public function __construct() |
||
| 19 | |||
| 20 | public function onSaving(Topic $topic) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Register the listeners for the subscriber. |
||
| 31 | * |
||
| 32 | * @param \Illuminate\Events\Dispatcher $events |
||
| 33 | */ |
||
| 34 | public function subscribe($events) |
||
| 41 | } |
||
| 42 |
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.