Take this random class


Got a mixture of code comments for class, variables, constants, methods etc all nice and tidy. I'm finding it really time consuming to comment my code to this standard. This is something that the official coding standards picks up on. I guess I could not bother but does make life easier when returning to 'old' code.


I'm using VScode. Is there a plugin or something out there than can generate some of this for me? Happy to even look at other editors.


1 Answer 1


PHPstrorm does indeed automatically generate doc comments if you type /** and press [enter] above any class, method of variable.



This is a plugin for Magento 2 development in the PhpStorm IDE. It is available via the JetBrains Plugin Repository


  • Go to Settings / Preferences in the PhpStorm IDE
  • Navigate to "Plugins"
  • Click the "Browse repositories..." button and search for "Magento PhpStorm"
  • Install the plugin and restart PhpStorm
  • Go to Settings / Preferences / Languages & Frameworks / PHP / Magento in the PhpStorm IDE
  • Check "Enable" and "OK" button.

Gives you some added benefits over standard IDE functionality

  • Configuration smart completion and references for XML/JavaScript files
  • "Navigate to configuration" reference in scope of class/interface
  • "Go to plugin" reference in scope of class/interface and method
  • "Navigate to Web API configuration" reference in scope of class/interface and method


Phpstorm functionality


Although can also be generated using above plugin

Can be helpful for debugging XML errors that are thrown in developer mode

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.