PHPStorm can't figure out which file a function declaration came from even if there's only one included

I'm looking at someone else's code, they have a file that includes file `common/', then there's a function call to db_connect() with a yellow underline, where PHPStorm says Unhandled Exception, and upon holding down Cmd while hovering over it, it says Multiple definitions; if I Cmd+click it, it shows a list of files including the included one that contain the function definition.

Yes I know it's bad to define the same function across multiple files, but I didn't do this; PHPStorm should know that the function is declared in the file that is actually included and immediately take me to that file unless those other files were also included.

There appears to be a lack of understanding of context with the include here; is there some setting to fix this? I expect even this basic logical functionality from such a smart editor.

1 comment
Comment actions Permalink

In fact, the situation resembles one discussion which you may be interested in:


To be honest, I am not sure that something will be changed on this matter.


Please sign in to leave a comment.