Tags:

Available Magento Code Sniffer rulesets

Basically I recommend following the PSR-2 standard for Coding Style Guidelines in Magento projects. Verifying your coding styles makes sense in any case – whether you are working in a large team of developers or as a freelancer for several clients. Agreeing to one common coding standard and following the rules improves readability and comparability.

Chris / / zuletzt aktualisiert am

But as we all know Magento has some quirks that do not fit very well this standard (like underscore class names, underscore prefixed variables, etc.)

That’s why some people adapted the existing rulesets to Magento.

This is a short list of customized Magento Code Sniffs for phpcs:

Update:
An interesting discussion regarding the ECG Coding Standard can also be found on StackExchange.

Which coding standards do you use?

BTW: Here is a useful tutorial how the phpcs tool can e.g. easily be integrated into PHPStorm.


Reaktionen auf "Available Magento Code Sniffer rulesets"

Kommentar erstellen

Mit der Nutzung dieses Formulars erklärst Du Dich mit der Speicherung und Verarbeitung Deiner Daten durch diese Website einverstanden. Informationen zur Verarbeitung Deiner Daten findest Du in der Datenschutzerklärung.
Ihre Daten werden sicher per SSL übertragen.

Meine Magento Extension Bestseller