| 1 | <?php |
||
| 20 | class MethodPolicy extends Base |
||
| 21 | { |
||
| 22 | private $userSpecificMethods = [ |
||
| 23 | 'getMe', |
||
| 24 | 'getMyDashboard', |
||
| 25 | 'getMyActivity', |
||
| 26 | 'createMyPrivateProject', |
||
| 27 | 'getMyProjectsList', |
||
| 28 | 'getMyProjects', |
||
| 29 | 'getMyOverdueTasks', |
||
| 30 | ]; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Determine if the current user has permissions. |
||
| 34 | * |
||
| 35 | * @param string $method |
||
| 36 | * |
||
| 37 | * @throws \JsonRPC\Exception\AccessDeniedException |
||
| 38 | */ |
||
| 39 | public function check($method) |
||
| 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.