When contributing to one of the projects under the CodeCollab organization these guidelines must be followed.
All projects use the following code style conventions / standards (with a couple of 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
Abstractprefix - Interfaces MUST NOT have an
Interfacesuffix - Traits MUST NOT be used
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.
- 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
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.
Always use the codings standards as defined under Coding standards.
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.