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
{{ message }}
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.
I've currently noticed some funny behaviour with convert local variable to instance variable when the local variable is a method parameter. Currently if you convert myvar in the following code
class X
{
publicfunctiondoSomething($myvar)
{
$myvar++;
return$myvar;
}
}
You get something like this
class X
{
private$myvar;
publicfunction doSomething($this->myvar)
{
$this->myvar++;
return$this->myvar;
}
}
Which includes syntax errors as well as logic errors. What I think it should actually produce is something like this:
class X
{
private$myvar;
publicfunctiondoSomething($myvar)
{
$this->myvar = $myvar;
$this->myvar++;
return$this->myvar;
}
}
The text was updated successfully, but these errors were encountered:
I've currently noticed some funny behaviour with convert
local variable to instance variable
when the local variable is a method parameter. Currently if you convertmyvar
in the following codeYou get something like this
Which includes syntax errors as well as logic errors. What I think it should actually produce is something like this:
The text was updated successfully, but these errors were encountered: