zencart/documentation

Coding Standards

torvista opened this issue · 2 comments

https://docs.zen-cart.com/dev/contributing/coding_standards/
Should this not be beefed up to actually state what should be done as a routine cleanup when a file is touched for a "real" reason.
Eg:

  • replace alias functions
  • strict comparisons
  • short array syntax
  • no nested ternary operators
  • remove redundant sanitation
  • no dynamic class properties
  • PSR-2/12 formatting

at some point, we need to consider a standardized code fixer (not an IDE), ie something like:

https://github.com/FriendsOfPHP/PHP-CS-Fixer
or
https://styleci.io/
or
https://github.com/squizlabs/PHP_CodeSniffer

create our own configuration using one of these tools, and then run the code through that prior to submitting a PR.

Fine by me, always keen to get more guidance on how to do things properly outside my bubble..