Code-Bitweaver Style Rules

Coding style check rules for a somewhat long in the tooth code base. Not very PHP-FIG friendly! The starting point for building the ruleset is the PHP Coding Standard Generator which allows selection o a range of rule set sniffs for the PHP_CodeSniffer style checker. This should also be able to automatically update a number of the detected errors, but currently phpcsf does not seem to be installed.

Generic.WhiteSpace.DisallowSpaceIndent - Tabs, not spaces, must be used for indentation.
Generic.Functions.OpeningFunctionBraceKernighanRitchie - Function declarations follow the "Kernighan/Ritchie style". The function brace is on the same line as the function declaration. One space is required between the closing parenthesis and the brace.
Generic.NamingConventions.ConstructorName - Disallows usage of PHP 4 style constructors
Generic.NamingConventions.CamelCapsFunctionName - Ensures camel case function naming and that only PHP core functions have a double underscore.
Generic.Classes.DuplicateClassName - A class or interface must not be defined in multiple files.
Generic.CodeAnalysis.EmptyStatement - Statements may not have an empty body.
Generic.ControlStructures.InlineControlStructure - Inline control structures like 'if($a) continue;' are not allowed (No missing braces)
Generic.Files.ByteOrderMark - Reports cases where a byte order mark is found in any PHP file to avoid application failures.
Generic.Formatting.NoSpaceAfterCast - There may be no spaces after cast statements.
Generic.PHP.DeprecatedFunctions - Disallows the use of any deprecated functions
Generic.PHP.DisallowShortOpenTag - Makes sure that shorthand PHP open tags are not used.
Generic.PHP.ForbiddenFunctions - Disallows the use of alias functions that are kept in PHP for compatibility with older versions.
Generic.PHP.UpperCaseConstant - The constants 'TRUE', 'FALSE' or 'NULL' must be written in uppercase.
Generic.Strings.UnnecessaryStringConcat - Strings must not be concatenated when they could be written as one string.
PEAR.Formatting.MultiLineAssignment - Assignment that spawn two lines must have their equal sign indented and on the new line
Squiz.PHP.EmbeddedPhp - Ensures an style for the indentation of embedded PHP code segments. - No empty embedded tags - No blank lines after the opening tag of the embedded code - No blank lines before the closing tag of the embedded code - Opening tag must be on a new line by its self - Closing tag must be on a line by itself - Indenting inside the php tags
Squiz.PHP.ForbiddenFunctions - Discourages the use of alias functions that are kept in PHP for compatibility with older versions. Can be subclassed to forbid the use of any function and suggest alternatives.
Squiz.PHP.Heredoc - Ensures that no Heredoc statements are used.
Squiz.PHP.LowercasePHPFunctions - Ensures all calls to builtin PHP functions are lowercase.
Squiz.PHP.NonExecutableCode - Warns about code that can never been executed. This happens when a function returns before the code, or a break ends execution of a statement etc.
Squiz.Scope.MemberVarScope - Ensures that class members have scope modifiers
Squiz.Scope.MethodScope - Ensures that methods have scope modifiers
Squiz.Scope.StaticThisUsage - Ensures that $this is not used in static methods to avoid runtime errors
Squiz.WhiteSpace.CastSpacing - Ensure cast statements does not contain whitespace.
Squiz.WhiteSpace.LogicalOperatorSpacing - Ensures that there is one space before and after a logical operator.
Squiz.WhiteSpace.ObjectOperatorSpacing - Ensures there is no whitespace before a ObjectOperator ( -> )
Squiz.WhiteSpace.PropertyLabelSpacing - Javascript: Ensures that the colon in a property or label definition has a single space after it and no space before it.
Squiz.WhiteSpace.ScopeClosingBrace - Ensures that the closing braces of scopes are on a new line and indented correctly.
Squiz.WhiteSpace.ScopeKeywordSpacing - Ensure there is a single space after scope keywords.
Squiz.WhiteSpace.SemicolonSpacing - Ensures that there is no whitespace before a semicolon.
Squiz.WhiteSpace.SuperfluousWhitespace - Checks that no whitespace proceeds the first content of the file, exists after the last content of the file, resides after content on any line, or are two empty lines in functions.
Zend.Files.ClosingTag - Files must not have closing tags to avoid whitespace issues