2 <ruleset name=
"phpseclib Standard">
4 <description>phpseclib coding standard
</description>
6 <!-- We are using the PEAR standard as a base -->
8 <!-- Temporary exceptions to the PEAR standard follow -->
9 <exclude name=
"Generic.ControlStructures.InlineControlStructure.Discouraged" />
10 <exclude name=
"Generic.Files.LineLength.TooLong" />
11 <exclude name=
"PEAR.NamingConventions.ValidFunctionName.FunctionNoCapital" />
12 <exclude name=
"PEAR.NamingConventions.ValidFunctionName.NotCamelCaps" />
13 <exclude name=
"PEAR.Commenting.ClassComment.InvalidVersion" />
14 <exclude name=
"PEAR.Commenting.ClassComment.MissingTag" />
15 <exclude name=
"PEAR.Commenting.FileComment.EmptyCopyright" />
16 <exclude name=
"PEAR.Commenting.FileComment.InvalidVersion" />
17 <exclude name=
"PEAR.Commenting.FunctionComment.ExtraParamComment" />
18 <exclude name=
"PEAR.Commenting.FunctionComment.MissingReturn" />
19 <exclude name=
"PEAR.Commenting.FunctionComment.MissingParamComment" />
20 <exclude name=
"PEAR.Commenting.FunctionComment.MissingParamName" />
21 <exclude name=
"PEAR.Commenting.FunctionComment.MissingParamTag" />
22 <exclude name=
"PEAR.Commenting.FunctionComment.ParameterCommentsNotAligned" />
23 <exclude name=
"PEAR.Commenting.FunctionComment.ParameterNamesNotAligned" />
24 <exclude name=
"PEAR.Commenting.FunctionComment.ParamNameNoMatch" />
25 <exclude name=
"PEAR.Commenting.FunctionComment.SpacingAfterParams" />
26 <exclude name=
"PEAR.Commenting.FunctionComment.SpacingBeforeParams" />
27 <exclude name=
"PEAR.Commenting.FunctionComment.SpacingBeforeTags" />
28 <exclude name=
"PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
29 <exclude name=
"PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
30 <exclude name=
"PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
31 <exclude name=
"PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" />
32 <exclude name=
"PEAR.WhiteSpace.ScopeClosingBrace.Indent" />
33 <exclude name=
"PEAR.WhiteSpace.ScopeClosingBrace.Line" />
34 <exclude name=
"PEAR.WhiteSpace.ScopeIndent.Incorrect" />
37 <!-- Useful additional rules follow -->
39 <!-- "for (; bar; )" should be "while (bar)" instead -->
40 <rule ref=
"Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />
42 <!-- A method MUST not only call its parent -->
43 <rule ref=
"Generic.CodeAnalysis.UselessOverridingMethod" />
45 <!-- All code files MUST use only UTF-8 without BOM. -->
46 <rule ref=
"Generic.Files.ByteOrderMark" />
48 <!-- Each file MUST end with exactly one newline character -->
49 <rule ref=
"PSR2.Files.EndFileNewline" />
51 <!-- In the argument list, there MUST NOT be a space before each comma,
52 and there MUST be one space after each comma. -->
53 <rule ref=
"Squiz.Functions.FunctionDeclarationArgumentSpacing">
55 <property name=
"equalsSpacing" value=
"1"/>
58 <rule ref=
"Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint" />
60 <!-- There MUST NOT be trailing whitespace at the end of lines. -->
61 <rule ref=
"Squiz.WhiteSpace.SuperfluousWhitespace" />
63 <!-- There MUST NOT be whitespace before the first content of a file -->
64 <rule ref=
"Squiz.WhiteSpace.SuperfluousWhitespace.StartFile" />
66 <!-- There MUST NOT be whitespace after the last content of a file -->
67 <rule ref=
"Squiz.WhiteSpace.SuperfluousWhitespace.EndFile" />
69 <!-- Functions MUST NOT contain multiple empty lines in a row -->
70 <rule ref=
"Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines" />
72 <!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
73 <rule ref=
"Zend.Files.ClosingTag" />