astorm / pestle

A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.
MIT License
533 stars 101 forks source link

Generated code is not PSR-2 compliant. #273

Open Vinai opened 7 years ago

Vinai commented 7 years ago

It would be nice if the generated code where PSR-2 compliant.

astorm commented 7 years ago

Don't see any problems with this. @Vinai -- do you have a preferred linting method for PSR-2?

Vinai commented 7 years ago

I use vendor/bin/phpcs --standard=psr2 <path-to-module>

The Magento coding standard extends psr2 somewhat, to use it the command is
vendor/bin/phpcs --standard=dev/tests/static/framework/Magento <path-to-module>

Can't help but mention for the record that I personally don't think the Magento coding standard is very good, for example enforcing PHPDoc comments only adds noise to the code.