Question

For fast class prototyping I'm looking for a way to create methods declaration from it's call.

Example :

I'm writing.

$this->doStuff($action);

Magic happens. Following code is generated :

function doStuff ($action) {
    //My cursor is here
}

Is it possible with PhpStorm ?

I saw code extraction implementation, it's nice, but it's not the same. Getters and setters inserting is not the same also, because a class property should be declared initially.

Was it helpful?

Solution

Alt + Enter while having caret on such call and choose appropriate option from there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top