How to turn off “field accessed by magic method” in PhpStorm

Your code in PhpStorm is looking good. No bugs, no coding errors, beautiful dark theme, but you are annoyed. You see warnings with regards to “Field accessed via magic method”. You just want to turn it off but it turns out PhpStorm is a beast and finding that setting every time you re-install is like finding a needle in a Haystack. Also searching for “magic method” in the settings help does not help either. Have no fear, because here is the setting:

Project Settings > Inspections > PHP > Undefined > Undefined field

Hint: Search on ‘undefined field‘ instead of ‘magic method’

Reference:
https://stackoverflow.com/questions/25578649/phpstorm-field-accessed-via-magic-method

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top