You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'd like to report what I understand to be a false positive in Phan. It occurs when a newThis is assigned to a Closure. The message from Phan is PhanUndeclaredThis Variable $this is undeclared. Thank you.
Example
<?phpclassNewThis
{
public$foo = 'bar';
}
$newThis = newNewThis();
$closure = function () {
return$this->foo; // PhanUndeclaredThis Variable $this is undeclared
};
var_dump(
$closure->call($newThis) // prints "bar"
);
Hello. I'd like to report what I understand to be a false positive in Phan. It occurs when a
newThis
is assigned to aClosure
. The message from Phan isPhanUndeclaredThis Variable $this is undeclared
. Thank you.Example
Example in Phan Demo
The text was updated successfully, but these errors were encountered: