Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 2.73 KB

File metadata and controls

63 lines (41 loc) · 2.73 KB

Contributing

When contributing to one of the projects under the CodeCollab organization these guidelines must be followed.

Coding standards

All projects use the following code style conventions / standards (with a couple of amendments):

Amendments

Additionally all code needs to be run in strict mode. The strict mode declaration must be on the first line of the file with a single space between the PHP opening tag and declare():

<?php declare(strict_types=1);

Also changes with regards to the PSR coding standards:

  • Property names MUST be declared in camelCase
  • Non property variable names MUST be declared in camelCase
  • All files MUST have declared strict types
  • The strict type declaration MUST be on the first lines in a file with a space between the PHP open tag and the declaration
  • Method arguments MUST be type hinted (including for scalar types)
  • Abstract classes MUST NOT have an Abstract prefix
  • Interfaces MUST NOT have an Interface suffix
  • Traits MUST NOT be used

Feature requests or bug reports

If you have a feature request or think you have found a bug, please open an issue on the appropriate GitHub repository of the specific project.

Contributing code

Creating a pull request

  • Submit one pull request per fix or feature
  • If your changes are not up to date - rebase your branch on master
  • Make sure all commits are meaningful. If there are several commits for fixes for a specific feature please squash them.
  • Follow the conventions used in the project
  • PR's are not looked at until they have a test for them

Unit tests

This project has unit tests for most code. When adding a new feature or when fixing a bug and sending over a PR adding (passing) test(s) is required and will make it easier to merge code.

Code style

Always use the codings standards as defined under Coding standards.

Licensing

Unless stated otherwise, all content is licensed under the Creative Commons Attribution License and code licensed under the MIT License.

Copies of all licenses are included in this project's root directory.