File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/cz/juzna/intellij/nette/utils Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,10 @@ public static PhpType extractTypeFromMethodTypes(@NotNull Collection<Method> typ
4444
4545 @ NotNull
4646 public static HashMap <String , Collection <Method >> findMagicFields (MemberReference reference , PhpIndex phpIndex ) {
47- PhpType type = reference .getType ();
47+ PhpType type = reference .getClassReference () != null ? reference . getClassReference (). getType () : null ;
4848
4949 HashMap <String , Collection <Method >> fields = new HashMap <String , Collection <Method >>();
50- if (!(new PhpType ().add ("Nette\\ Object" )).isConvertibleFrom (type , phpIndex )) {
50+ if (type == null || !(new PhpType ().add ("Nette\\ Object" )).isConvertibleFrom (type , phpIndex )) {
5151 return fields ;
5252 }
5353 for (PhpClass cls : PhpIndexUtil .getClasses (type , phpIndex )) {
You can’t perform that action at this time.
0 commit comments