Community
Participate
Working Groups
Created attachment 255455 [details] Example file with class with method and anon type object Prerequirements: * Create class with method. * Create object with unknown type. * Call on this object method, created in class. * Go into class with method and activate "Call Hierarchy" AS IS: * System show you call from file with unknown type object. SHOULD BE: * System show you nothing. URLS: * http://gyazo.com/4ffa37ae37e88eb8fb046efbd2f32f96 - Screenshot
Created attachment 255456 [details] Screenshot for quick understand
It's correct behavior for me. If PDT isn't able to detect object type, fallback to filter by name. As an enhancement we may introduce "strict" mode, to filter such positions.
Hi Dawid, Tnx for the quick answer. I dont' think it should be a default, until we are at some javascript-like weak-typed lang. In PHP it should be ok to determine by default class name or @phpdoc mechanism. In my concrete case I have a class with method "send" and in it's call hierarchy I see a tons of non-related "send" calls. I dont' think that in OOP-lang we should stay in "unknown" types calls side. My colleague test same case in phpstorm (I dont' like it anyway for base unusability) and it gets us calls only when we mark class intentionally. It dont' give us calls of anons. So if you think it could be added as an option, I vote for "Strict" mode to be default and enable "Week mode" by standalone option.