1 | <?php |
||
9 | class TopicListener |
||
10 | { |
||
11 | /** |
||
12 | * Create the event listener. |
||
13 | */ |
||
14 | public function __construct() |
||
18 | |||
19 | public function onSaving(Topic $topic) |
||
26 | |||
27 | /** |
||
28 | * Register the listeners for the subscriber. |
||
29 | * |
||
30 | * @param \Illuminate\Events\Dispatcher $events |
||
31 | */ |
||
32 | public function subscribe($events) |
||
39 | } |
||
40 |
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@property
annotation 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.