How to stop this message: "Member has protected access, but class has magic method __get"?

已回答

How to stop this message: "Member has protected access, but class has magic method __get"?

I searched everywhere but can not find the option to disable this inspection.

I really do not want the properties remain marked with a different color when they are private and there is a magic method __get in classes.

This is pissing me off.

3

You can run Code > Inspect Code > File > right click a line in inspection results > Disable inspection.

-7
Avatar
Permanently deleted user

There's no way to disable this inspection.

To remove the mark should do the following:

  1. Settings (CTRL + Alt + S)
  2. Editor -> Colors & Fonts -> Copy the current Scheme
  3. Editor -> Colors & Fonts -> General -> Erros and Warnings -> Warning
  4. Mark off "Background" and "Error stripe mark" or do as you wish.

PhpStorm version 2016.1.2

-2

Dmitry's suggestion didn't help: https://i.imgur.com/TzayxcV.png

Any other tips?

0

As it's not a separate inspection, you can't disable it not affecting other inspections.
Please leave your vote here: https://youtrack.jetbrains.com/issue/WI-25253

1

PLEEASE JetBrains at least allow us to disable this error.  It's been years since this was reported.  I've disabled ALL inspections (not just PHP) and yet the problem  and yet while other warnings have gone, this error remains.  Showing the whole path with a red line underneath, this request has lots of upvotes for what should be a relatively simple fix.

2

Running into a version of this problem in a Laravel project, in which par for the course with Laravel's usual insanity, Route exposes protected members through __callstatic.   Disabled every single inspection, but that one stubbornly stayed there, with no way to suppress or disable it.  Deleted my .idea/ folder, no dice, the brokenness is in the IDE.  I wonder whether this issue will be old enough to drink by the time it gets addressed?

 

0

请先登录再写评论。