Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coding Standards #879

Open
torvista opened this issue Aug 11, 2022 · 2 comments
Open

Coding Standards #879

torvista opened this issue Aug 11, 2022 · 2 comments

Comments

@torvista
Copy link
Member

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
@proseLA
Copy link
Sponsor Contributor

proseLA commented Aug 11, 2022

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.

@torvista
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants