2013-11-23 20:01:26 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<ruleset name="phpseclib Standard">
|
|
|
|
|
|
|
|
<description>phpseclib coding standard</description>
|
|
|
|
|
2015-07-08 14:48:57 +00:00
|
|
|
<!-- We are using the PSR2 standard as a base -->
|
|
|
|
<rule ref="PSR2">
|
2015-07-17 11:36:18 +00:00
|
|
|
<!-- Exceptions due to legacy code with PHP4 compatibility -->
|
2015-07-08 14:48:57 +00:00
|
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.ScopeMissing" />
|
|
|
|
<exclude name="PSR2.Classes.PropertyDeclaration.VarUsed" />
|
|
|
|
<exclude name="Squiz.Scope.MethodScope.Missing" />
|
|
|
|
|
|
|
|
<!-- Exceptions for backward compatibility -->
|
|
|
|
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
|
|
|
|
<exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
|
|
|
|
|
|
|
|
<!-- Exceptions for whitespacing -->
|
|
|
|
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma" />
|
|
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonCASE" />
|
|
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.SpaceBeforeColonDEFAULT" />
|
|
|
|
|
|
|
|
<!-- Other Exceptions -->
|
|
|
|
<exclude name="Generic.Files.LineLength.TooLong" />
|
|
|
|
<exclude name="PSR2.ControlStructures.SwitchDeclaration.TerminatingComment" />
|
2014-02-15 18:16:21 +00:00
|
|
|
</rule>
|
2013-12-01 02:30:43 +00:00
|
|
|
|
|
|
|
<!-- Useful additional rules follow -->
|
|
|
|
|
2013-11-23 20:01:26 +00:00
|
|
|
<!-- "for (; bar; )" should be "while (bar)" instead -->
|
|
|
|
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
|
|
|
|
|
|
|
|
<!-- A method MUST not only call its parent -->
|
|
|
|
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod" />
|
|
|
|
|
|
|
|
</ruleset>
|