Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.39 KB

CONTRIBUTING.md

File metadata and controls

29 lines (21 loc) · 1.39 KB

Contribute?

If you would like to contribute, please try to adhere to the coding standards I have detailed below, if you have any questions or believe I have missed something, please contact me, ideally all code should adhere to PSR2.

Pull requests

Pull requests should be from a branch in your fork, please also try to give your branch a name that relates to the change/feature you want me to merge. Most importantly, before creating a pull request, please update your fork.

Files

  • Use UTF-8 character encoding.
  • Unix formatted, (LF).
  • A line length of 120 characters, this is not in any way a fixed requirement, please let context dictate, don't make code harder to read by wrapping it to hit a particular line length.
  • All code and comments should be in English.
  • Spaces for all indenting, I recommend four spaces per tab.

PHP

  • Please always use <?php ... ?>, never <? ... ?>.
  • PHP CONSTANTS should all be in UPPERCASE.
  • PHP keywords should be in lowercase, including, true, false and null.
  • Braces on their own line for classes, namespaces and functions
  • Braces in line for if/while etc
  • UpperCamelCase for classes, interfaces etc.
  • lowerCamelCase for methods and functions
  • lowercase_with_underscores for multiple word variables/fields

You can read more about PSR at the following link - https://www.php-fig.org/psr/psr-2/