2016-08-26 17:21:50 -04:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset name="Tim's Coding Standard">
|
|
|
|
<description>A variation of the CodeIgniter standard</description>
|
|
|
|
|
|
|
|
<file>../src/</file>
|
|
|
|
|
2016-08-26 23:10:20 -04:00
|
|
|
<encoding>utf-8</encoding>
|
|
|
|
|
2016-08-26 17:21:50 -04:00
|
|
|
<rule ref="Generic.Files.LineEndings">
|
|
|
|
<properties>
|
|
|
|
<property name="eolChar" value="\n"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
<!-- PHP files should OMIT the closing PHP tag -->
|
|
|
|
<rule ref="Zend.Files.ClosingTag"/>
|
|
|
|
<!-- Always use full PHP opening tags -->
|
|
|
|
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
|
|
|
|
|
|
|
|
<!-- Constants should always be fully uppercase -->
|
|
|
|
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
|
|
|
|
<!-- TRUE, FALSE, and NULL keywords should always be fully uppercase -->
|
|
|
|
<rule ref="Generic.PHP.UpperCaseConstant"/>
|
|
|
|
|
|
|
|
<!-- One statement per line -->
|
|
|
|
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
|
|
|
|
|
|
|
<!-- Classes and functions should be commented -->
|
2016-08-26 23:10:20 -04:00
|
|
|
<rule ref="PEAR.Commenting.ClassComment">
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingCategoryTag" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingPackageTag" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingAuthorTag" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingLicenseTag" />
|
|
|
|
<exclude name="PEAR.Commenting.ClassComment.MissingLinkTag" />
|
|
|
|
</rule>
|
|
|
|
<rule ref="PEAR.Commenting.FunctionComment">
|
|
|
|
<!-- Exclude this sniff because it doesn't understand multiple types -->
|
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment" />
|
2016-08-29 14:32:28 -04:00
|
|
|
<exclude name="PEAR.Commenting.FunctionComment.SpacingAfterParamType" />
|
2016-08-26 23:10:20 -04:00
|
|
|
</rule>
|
|
|
|
|
2016-08-26 17:21:50 -04:00
|
|
|
<!-- Use warnings for docblock comments for files and variables, since nothing is cleary explained -->
|
|
|
|
<rule ref="PEAR.Commenting.FileComment">
|
2016-08-26 23:10:20 -04:00
|
|
|
<exclude name="PEAR.Commenting.FileComment.InvalidVersion" />
|
|
|
|
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag" />
|
2016-08-26 17:21:50 -04:00
|
|
|
<properties>
|
|
|
|
<property name="error" value="false"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2016-08-26 23:10:20 -04:00
|
|
|
|
|
|
|
<rule ref="Squiz.Commenting.FunctionCommentThrowTag"/>
|
2016-08-26 17:21:50 -04:00
|
|
|
<rule ref="Squiz.Commenting.VariableComment">
|
|
|
|
<properties>
|
|
|
|
<property name="error" value="false"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
|
|
|
|
<!-- Use Allman style indenting. With the exception of Class declarations,
|
|
|
|
braces are always placed on a line by themselves, and indented at the same level as the control statement that "owns" them. -->
|
|
|
|
<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>
|
|
|
|
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
|
|
|
|
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
|
|
|
|
|
2016-08-26 23:10:20 -04:00
|
|
|
<!-- Use only short array syntax -->
|
|
|
|
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
|
|
|
|
|
2016-08-26 17:21:50 -04:00
|
|
|
<rule ref="Generic.PHP.ForbiddenFunctions">
|
|
|
|
<properties>
|
|
|
|
<property name="forbiddenFunctions" type="array" value="create_function=>null,eval=>null" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2016-08-26 23:10:20 -04:00
|
|
|
|
|
|
|
<!-- Inherit CodeIgniter Rules -->
|
|
|
|
<rule ref="./CodeIgniter">
|
|
|
|
<properties>
|
|
|
|
<property name="error" value="false" />
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2016-08-26 17:21:50 -04:00
|
|
|
</ruleset>
|