Created
December 31, 2019 10:10
-
-
Save mkroeders/98b5f9e56e5e0f1e2c3b53a1e468c71a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<ruleset name="LessLibs PHPCS"> | |
<config name="installed_paths" value="../../slevomat/coding-standard"/> | |
<file>../../../src</file> | |
<file>../../../test</file> | |
<!-- Include the whole PEAR standard --> | |
<rule ref="PEAR"> | |
<exclude name="PEAR.Commenting.FileComment.Missing"/> | |
<exclude name="PEAR.Commenting.ClassComment.MissingAuthorTag"/> | |
<exclude name="PEAR.Commenting.ClassComment.MissingCategoryTag"/> | |
<exclude name="PEAR.Commenting.ClassComment.MissingLinkTag"/> | |
<exclude name="PEAR.Commenting.ClassComment.MissingLicenseTag"/> | |
<exclude name="PEAR.Commenting.ClassComment.MissingPackageTag"/> | |
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment"/> | |
<exclude name="PEAR.Commenting.FunctionComment.SpacingAfterParamType"/> | |
<exclude name="PEAR.NamingConventions.ValidFunctionName.PrivateNoUnderscore"/> | |
<exclude name="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore"/> | |
<!-- Goes wrong in switch --> | |
<exclude name="PEAR.WhiteSpace.ScopeIndent.IncorrectExact"/> | |
</rule> | |
<rule ref="../../slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml"> | |
<!-- We work from src --> | |
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName.NoMatchBetweenTypeNameAndFileName"/> | |
<!-- Don't prefix everything with a \ --> | |
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions.NonFullyQualified"/> | |
<!-- Allow all namespaces --> | |
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces.NonFullyQualified"/> | |
<!-- Always add () even on empty --> | |
<exclude name="SlevomatCodingStandard.ControlStructures.NewWithoutParentheses.UselessParentheses"/> | |
<!-- Short and sweet --> | |
<exclude | |
name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/> | |
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions.NonFullyQualifiedException"/> | |
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants.NonFullyQualified"/> | |
<!-- No yoda --> | |
<exclude name="SlevomatCodingStandard.ControlStructures.RequireYodaComparison.RequiredYodaComparison"/> | |
<!-- Just mix it --> | |
<exclude name="SlevomatCodingStandard.TypeHints.DisallowMixedTypeHint.DisallowedMixedTypeHint"/> | |
<exclude name="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax.DisallowedArrayTypeHintSyntax"/> | |
<!-- Future proofing --> | |
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/> | |
<!-- With multiple if it becomes weird --> | |
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.EarlyExitNotUsed"/> | |
<!-- Prefix name's with abstract --> | |
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming.SuperfluousPrefix"/> | |
<!-- It is abstract --> | |
<exclude | |
name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants.DisallowedLateStaticBindingForConstant"/> | |
<!-- Nothing is useless... --> | |
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation"/> | |
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation"/> | |
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.UselessAnnotation"/> | |
<!-- Can become a contradiction when only imports are added --> | |
<exclude name="SlevomatCodingStandard.Classes.TraitUseSpacing.IncorrectLinesCountAfterLastUse"/> | |
<!-- Allow for numeric literals --> | |
<exclude name="SlevomatCodingStandard.Numbers.DisallowNumericLiteralSeparator.DisallowedNumericLiteralSeparator"/> | |
<!-- Decide what fits the best per case --> | |
<exclude name="SlevomatCodingStandard.Functions.RequireArrowFunction.RequiredArrowFunction"/> | |
<exclude name="SlevomatCodingStandard.Functions.DisallowArrowFunction.DisallowedArrowFunction"/> | |
</rule> | |
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | |
<properties> | |
<property name="newlinesCountBetweenOpenTagAndDeclare" value="1"/> | |
</properties> | |
</rule> | |
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | |
<properties> | |
<property name="spacesCountAroundEqualsSign" value="0"/> | |
</properties> | |
</rule> | |
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces"> | |
<properties> | |
<property name="linesCountAfterOpeningBrace" value="0"/> | |
<property name="linesCountBeforeClosingBrace" value="0"/> | |
</properties> | |
</rule> | |
<rule ref="Generic.Files.LineLength"> | |
<properties> | |
<property name="lineLimit" value="200"/> | |
</properties> | |
</rule> | |
<rule ref="SlevomatCodingStandard.Namespaces.UnusedUses"> | |
<properties> | |
<property name="searchAnnotations" value="true"/> | |
</properties> | |
</rule> | |
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing"> | |
<properties> | |
<property name="linesCountBetweenDifferentAnnotationsTypes" value="1"/> | |
</properties> | |
</rule> | |
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"> | |
<properties> | |
<property name="linesCountBeforeFirstUse" value="0"/> | |
</properties> | |
</rule> | |
</ruleset> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment