| 1 | <?php |
||
| 14 | class UserPolicy extends Policy |
||
| 15 | { |
||
| 16 | use HandlesAuthorization; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Determine if the user is updating himself and not another user. |
||
| 20 | * |
||
| 21 | * @param \App\Containers\User\Models\User $user |
||
| 22 | * @param $inputUserId |
||
| 23 | * |
||
| 24 | * @return bool |
||
| 25 | */ |
||
| 26 | public function update(User $user, $inputUserId) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Determine if the user is deleting himself and not another user. |
||
| 34 | * |
||
| 35 | * @param \App\Containers\User\Models\User $user |
||
| 36 | * @param $inputUserId |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function delete(User $user, $inputUserId) |
||
| 45 | } |
||
| 46 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.