0

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.

1 Answer 1

1

Refactor | Extract | Variable...

Additional info/tutorial: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Refactorings+in+PhpStorm

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.