Skip to content

Instantly share code, notes, and snippets.

@pzhuchkov
Created October 28, 2015 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pzhuchkov/324cb97e72f4846c5484 to your computer and use it in GitHub Desktop.
Save pzhuchkov/324cb97e72f4846c5484 to your computer and use it in GitHub Desktop.
phpcs
<?xml version="1.0"?>
<!--http://edorian.github.io/php-coding-standard-generator/#phpcs-->
<ruleset name="Bradburylab">
<description>Bradburylab coding standard</description>
<exclude-pattern>*/tests/*</exclude-pattern>
<!-- Include the whole PSR-2 standard -->
<!--<rule ref="PSR2">-->
<!--<exclude name="Generic.WhiteSpace.ScopeIndent"/>-->
<!--</rule>-->
<rule ref="Security">
<exclude name="Security.Drupal7.AESModule"/>
<exclude name="Security.BadFunctions.FilesystemFunctions"/>
</rule>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.JumbledIncrementer"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UnusedFunctionParameter"/>
<rule ref="Generic.Commenting.Todo"/>
<rule ref="Generic.Commenting.Fixme"/>
<rule ref="Generic.Files.LineEndings"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="170"/>
</properties>
</rule>
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
<rule ref="Generic.Functions.CallTimePassByReference"/>
<!--<rule ref="Generic.Functions.OpeningFunctionBraceBsdAllman"/>-->
<rule ref="Generic.Metrics.NestingLevel"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.NamingConventions.CamelCapsFunctionName"/>
<rule ref="Generic.PHP.DeprecatedFunctions"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<rule ref="MySource.PHP.EvalObjectFactory"/>
<rule ref="MySource.PHP.GetRequestData"/>
<!--<rule ref="MySource.PHP.ReturnFunctionValue"/>-->
<rule ref="PEAR.Classes.ClassDeclaration"/>
<!--<rule ref="PEAR.Commenting.ClassComment"/>-->
<rule ref="PEAR.Commenting.FunctionComment"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<rule ref="PEAR.ControlStructures.ControlSignature"/>
<rule ref="PEAR.ControlStructures.MultiLineCondition"/>
<rule ref="PEAR.Formatting.MultiLineAssignment"/>
<!--Проверка функций-->
<rule ref="PEAR.Functions.FunctionCallSignature"/>
<!--<rule ref="PEAR.Functions.FunctionDeclaration"/>-->
<rule ref="PEAR.Functions.ValidDefaultValue"/>
<rule ref="PEAR.NamingConventions.ValidClassName"/>
<!--<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>-->
<rule ref="PSR1.Classes.ClassDeclaration"/>
<rule ref="Zend.Files.ClosingTag"/>
<!--<rule ref="Zend.NamingConventions.ValidVariableName"/>-->
<rule ref="Squiz.Scope.MemberVarScope"/>
<rule ref="Squiz.Scope.MethodScope"/>
<rule ref="Squiz.Scope.StaticThisUsage"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LanguageConstructSpacing"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<!--<rule ref="Squiz.WhiteSpace.ObjectOperatorSpacing"/>-->
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.ScopeKeywordSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
<!--<rule ref="Security.BadFunctions.Asserts"/>-->
<!--<rule ref="Security.BadFunctions.Backticks"/>-->
<!--<rule ref="Security.BadFunctions.CallbackFunctions"/>-->
<!--<rule ref="Security.BadFunctions.CryptoFunctions"/>-->
<!--<rule ref="Security.BadFunctions.EasyRFI"/>-->
<!--<rule ref="Security.BadFunctions.EasyXSS">-->
<!--<properties>-->
<!--&lt;!&ndash; Comment out to follow global ParanoiaMode &ndash;&gt;-->
<!--<property name="forceParanoia" value="1"/>-->
<!--</properties>-->
<!--</rule>-->
<!--<rule ref="Security.BadFunctions.ErrorHandling"/>-->
<!--<rule ref="Security.BadFunctions.FringeFunctions"/>-->
<!--<rule ref="Security.BadFunctions.FunctionHandlingFunctions"/>-->
<!--<rule ref="Security.BadFunctions.Mysqli"/>-->
<!--<rule ref="Security.BadFunctions.NoEvals"/>-->
<!--<rule ref="Security.BadFunctions.Phpinfos"/>-->
<!--<rule ref="Security.BadFunctions.PregReplace"/>-->
<!--<rule ref="Security.BadFunctions.SQLFunctions"/>-->
<!--<rule ref="Security.BadFunctions.SystemExecFunctions"/>-->
<!--<rule ref="Security.CVE.20132110"/>-->
<!--<rule ref="Security.CVE.20134113"/>-->
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment