Reputation: 784
I remember It's possible to create variable from selected text in storm, but I cant find how to do this.
If I have code like this:
$a = new SomeClass(new A(), new B());
...and I select text
new B()
PHPStorm should change this code to:
$newVawiable = new B();
$a = new SomeClass(new A(), $newVariable);
I remember It's possible, but I don't remember how.
Upvotes: 0
Views: 101
Reputation: 165118
Refactor | Extract | Variable...
Additional info/tutorial: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Refactorings+in+PhpStorm
Upvotes: 1