Consider switching coding standards to use Zend Framework Coding Standard #617
Labels
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
wontfix
If you can reproduce this issue, please reopen the issue or create a new one describing it.
Currently Piwik Coding Standard are documented here: [Piwik Coding Standard](http://dev.piwik.org/trac/wiki/CodingStandard).
But they have a number of slight differences with the Zend Framework Coding Standards, that are not justified. It would be ideal if Piwik used the same (very standard and widely used) [Zend Framework Coding Standard](http://framework.zend.com/manual/en/coding-standard.html).
Main differences:
- if else bracket indentation. The one used in Piwik makes the code a bit harder to read as it takes more lines.
- using four spaces for for indentation rather than tabs
Is there a script (or eclipse plugin for example) we can use to run all Piwik .php against, to automatically modify all files against this standard?
After quick research there seem to be [some solution](http://cogo.wordpress.com/2008/07/13/enforcing-a-php-coding-standard-using-php_codesniffer-part-2/)
Note that we’re not looking into adding a post commit hook to enforce that the guide is respected, it’s more about fixing the existing code in an automated manner in a “one shot” run of some script.
If anybody wants to tackle this, please comment! thanks.
The text was updated successfully, but these errors were encountered: