Subscribe to PHP Freaks RSS

Freek Van der Herten: Configuring PhpStorms code generation

syndicated from www.phpdeveloper.org on December 5, 2018

Freek Van der Herten has a tutorial posted to his site sharing some customizations you can make to PHP code generation in PhpStorm to fix some issues he's noticed in his own development work in the IDE.

I've been using PhpStorm for quite some time now, but never took the effort to fix a few minor annoyances I had with it.

He shows how to change the generation for:

  • Getting rid of the default comment for new PHP files
  • Compact docblocks for instance variables
  • Fixing the placement of the caret
  • Using fully qualified class names in doc blocks
  • Changing the default visibility

The final item in the post isn't so much a code generation change as it is a tip for saving these changes and your other configuration options. He shows how to back them up on a git repository out on GitHub.