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 realise that this is designed primarily for use within classes however sometimes you can't/don't have 100% of your functions as methods in a class, when working in Wordpress for example.
Having the rename-local-variable functionality working for standard global space functions as well as methods would be a nice feature. Currently it returns an error:
$ php refactor.phar rename-local-variable test.php 136 oldname newname
[QafooLabs\Refactoring\Domain\Model\RefactoringException]
The range 136-136 is not inside one single method.
rename-local-variable file line name new-name
The text was updated successfully, but these errors were encountered:
I'm sure the current functionality is normal, this is more a request for an extension of an existing feature than it is a bug report.
Maybe i'm missing something, which is quite likely because I haven't looked into the code base :*). But I don't immediately see any reason that changing the name of a local variable within a global space function is any more difficult than changing the name of a local variable within a class' method?
class MyClass
{
private function MyClassFunction()
{
$my_var = 1;
$my_var++;
}
}
vs
function MyClassFunction()
{
$my_var = 1;
$my_var++;
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I realise that this is designed primarily for use within classes however sometimes you can't/don't have 100% of your functions as methods in a class, when working in Wordpress for example.
Having the rename-local-variable functionality working for standard global space functions as well as methods would be a nice feature. Currently it returns an error:
The text was updated successfully, but these errors were encountered: