IntroductionIf you want to write code for BurstCMS, you will need to follow the coding standard. As stated in the description, this document describes how PHP code should be formatted to be consistent with the existing PHP code. Coding standardsBracketsBrackets should generally be on their own line. <?php
if ($debugMode)
{
echo 'Debug mode is on';
}
else
{
echo 'Debug mode is off';
}
?>IndentationNote: some code in BurstCMS source needs to be migrated to this standard. Actual \t tabs should not be used. Instead, use four spaces. WidthAll code should be able to fit within an 80 character width. Though, it is optimal if the code can fit in a 75 character width. This policy exists because most terminals are 80 characters wide. Because some people use text editors, such as Vim, and like to enable line numbering, this takes away a few characters from the width. However, 80-character width code will be accepted, though it will not be seen as perfectly formatted. If you are writing new code, please try to stay within 75 characters. More standards to be documented here later.
|