1
0
Fork 0
Commit Graph

3 Commits (32d1210f698ec92ba15fc991ae7e0d8ef764ad37)

Author SHA1 Message Date
alWerewolf 631be91b17 Revert "Revert "Tolerate $this usage in anonymous functions""
This reverts commit ed32ac7659.
2017-11-30 18:10:46 +03:00
alWerewolf ed32ac7659 Revert "Tolerate $this usage in anonymous functions"
This reverts commit 47d6424c98.
2017-11-30 18:10:38 +03:00
alWerewolf 47d6424c98 Tolerate $this usage in anonymous functions
Alternative solution for issue 536.
Gives warning "$this might not be bound by invoker of callable or might be bound to object of any class. Consider adding instance class check." for $this var usage.
And hints developer to check class of $this before usage.
Class check can be added in form "if ($this instanceof [class])" {/*use $this*/}.
Note: if class check added no type checking is done its in language server it just hides the warning.
2017-11-30 18:02:34 +03:00