atom / symbols-view

Jump to symbols in Atom
MIT License
164 stars 114 forks source link

Some methods are ignored #133

Closed loranger closed 8 years ago

loranger commented 8 years ago

Hello,

I work on a messy legacy code and I just found an issue with this huge User.php class. For a reason I cannot understand, symbols-view just ignore my setGoldMember method, while it finds the following methods matching my setGold search

As you can see, the setGoldMemberdeclared line 2003 (yeah, that's why symbols-view should help me) is definitely ignored, while I can loop between the 3 other following methods matching the setGold search.

Is there a way to avoid this and make sure symbols-view is reliable ?

mshenfield commented 8 years ago

@loranger, it looks like this is a duplicate of issue #130. The underlying problem is that symbols-view is interpreting the default function parameters $recurring='Y' as a free variable when there are spaces around it, as in setGoldMember. To see setGoldMemberRecurring disappear as well, put a space in front of the $recurring='Y' parameter, close and re-open the file to destroy the symbol-view cache, and view the symbols again. symbols-view only allows one symbol per line, so recurring is taking precedence of `setGoldMember. See issue #130 for a more detailed discussion of the underlying causes, and some solutions.

loranger commented 8 years ago

Ok, I understand. Thank you for explaining.