Closed DrRoach closed 9 years ago
Why is PSR better than the lithium coding standard?
PSR recommends 4 spaces. 'Nuff said.
Because PSR is seen as the industry standard for PHP and is followed by most developers
EDIT: I do know where you're coming from with the spaces, I hate it too, but it's easier to use them than not be able to format my code without changing thousands of lines
Lithium and its companion projects use the lithium coding standard. Yes - PSR-2 is (recently) used by several PHP projects. Changing the coding standard on such a huge codebase as we have here is a lot of work and doesn't give us much benefit.
For your apps you can pick any standard you'd like to follow. A project using lithium isn't forced to use the lithium coding standard.
You can pick the rules to check on a per library basis using custom ruleset files: https://github.com/UnionOfRAD/li3_quality#custom-rules-set
Why does the syntax checker for this plugin not follow PSR? I know a lot of code will probably change inside this plugin and lithium itself to follow the PSR rules but surely it makes more sense to follow them than not to? My biggest annoyance of all is the fact that this plugin enforces tabs for indenting and not spaces which goes completely against PSR-2. Can we change this?