Seeing 2 comments for a funciton

When I reference a method, I often see two comments that are identical for it:

It seems though that function has only one signature:

Am I misunderstanding what I'm seeing, or is there a way to turn off the 2nd hint?


Hi there,

What is the source (full file path) for both of them?

Just use the function as on your first screenshot and then Ctrl+Click on it -- if there are more than 1 definition then PhpStorm will offer a popup with the targets. Get to each of them and see what the difference might be.

If they both point to the same place -- it could be something wrong with your IDE setting/setting.

  • Try fixing it from the File menu: "File | Repair IDE...". May also try "File | Invalidate caches" and restart first...
  • Disabling all custom (not bundled by default) plugins should also help (in case if this is caused by some plugin) -- disable all, restart. If it works OK now -- try enabling 1-2 at a time (& restart the IDE) until you see which one causes it.
  • Also double check your "Settings | Directories" -- maybe that unwanted folder is listed there. See if you can mark it as Excluded.
  • Also check "Settings | PHP | Include Paths" (a place to reference 3rd party code that is not part of the project code itself)

P.S. The Source path on your second screenshot looks odd. No clue where it may be coming from. Looks like some plugin or a linter-like tool (that may include own copy of PhpStorm stubs).


Thanks Andriy.

Your repair suggestion fixed both the duplicate messages and the source path!


Please sign in to leave a comment.