| 1 | <?php |
||
| 7 | final class CreatedByAndUpdatedByObserver extends BaseObserver |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Listen to the BaseModel creating event. |
||
| 11 | * |
||
| 12 | * @param BaseModel $model |
||
| 13 | * @return void |
||
| 14 | */ |
||
| 15 | public function creating(BaseModel $model) |
||
| 22 | |||
| 23 | |||
| 24 | /** |
||
| 25 | * Listen to the BaseModel updating event. |
||
| 26 | * |
||
| 27 | * @param BaseModel $model |
||
| 28 | * @return void |
||
| 29 | */ |
||
| 30 | public function updating(BaseModel $model) |
||
| 37 | } |
||
| 38 |
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.