apartridge
apartridge

Reputation: 1820

PhpStorm/IntelliJ generate method from usage

I'm looking for a generate method from usage. IntelliJ supports extract, rename etc. But if i write, for instance, $this->new_method($a) i would like to quickly generate this method in the same class. Does this exist or maybe there is a plugin for it?

Thanks for any help

Upvotes: 19

Views: 5058

Answers (1)

LazyOne
LazyOne

Reputation: 165088

  1. Place cursor on non existing method
  2. Alt + Enter (or wait and click on light bulb)
  3. Choose Add method from submenu.

enter image description here

Upvotes: 33

Related Questions