As PocketMine-MP, we are using PSR-2 with a few exceptions.
- Opening braces MUST go on the same line, and MUST have a space before.
else if
MUST be written as elseif- Control structure keywords or opening braces MUST NOT have spaces before or after them.
- Code SHOULD use spaces for indenting.
- Files MUST use only the <?php tag.
- Files MUST NOT have an ending ?> tag.
- Code MUST use namespaces.
- Strings SHOULD use the double quote " except when the single quote is required.
- The header of new PHP files MUST be:
/**
* _____ ____ ____ __ __ __ ______
* | __ \ / __ \ / __ \ | \/ |/_ ||____ |
* | |__) || | | || | | || \ / | | | / /
* | _ / | | | || | | || |\/| | | | / /
* | | \ \ | |__| || |__| || | | | | | / /
* |_| \_\ \____/ \____/ |_| |_| |_| /_/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*/
Before you start making your contributions, we suggest that you read: