Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0"?>
<ruleset name="PSR extended">
<description>PSR extended with PEAR comments</description>
<rule ref="PEAR.Commenting.FileComment">
<exclude name="PEAR.Commenting.FileComment.MissingAuthorTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLicenseTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
<exclude name="PEAR.Commenting.FileComment.MissingTag"/>
<exclude name="PEAR.Commenting.FileComment.Missing"/>
</rule>
<rule ref="PEAR.Commenting.ClassComment">
<exclude name="PEAR.Commenting.ClassComment.MissingTag"/>
</rule>
<rule ref="PEAR.Commenting.FunctionComment"/>
<rule ref="PEAR.Commenting.InlineComment"/>
<rule ref="Generic.Files.LineLength">
<properties>
<property name="lineLimit" value="120"/>
<property name="absoluteLineLimit" value="120"/>
</properties>
</rule>
<rule ref="PSR1" />
<rule ref="PSR2" />
<!-- Some metrics Linter -->
<rule ref="Generic.Metrics.CyclomaticComplexity">
<properties>
<property name="complexity" description="More complex functions will generate a warning" value="6"/>
<property name="absoluteComplexity" description="More complex functions will generate an error"
value="6"/>
</properties>
</rule>
<rule ref="Generic.Metrics.NestingLevel">
<properties>
<property name="nestingLevel" description="Deeper nested functions will generate a warning" value="5"/>
<property name="absoluteNestingLevel" description="Deeper nested functions will generate a warning"
value="5"/>
</properties>
</rule>
<!-- VariableComment Linter -->
<rule ref="Squiz.Commenting.VariableComment"/>
<rule ref="Squiz.Commenting.VariableComment.ShortFullStop">
<severity>0</severity>
</rule>
<rule ref="Squiz.Commenting.VariableComment.MissingShort">
<severity>0</severity>
</rule>
<rule ref="Squiz.Commenting.VariableComment.SpacingBeforeTags">
<severity>0</severity>
</rule>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
<!-- ClassComment Linter -->
<rule ref="PEAR.Commenting.ClassComment">
<exclude name="PEAR.Commenting.ClassComment.MissingVersion"/>
<exclude name="PEAR.Commenting.ClassComment.MissingTag"/>
<!-- for phpcs == 2.1.0 -->
<exclude name="PEAR.Commenting.ClassComment.Missing@categoryTag"/>
<exclude name="PEAR.Commenting.ClassComment.Missing@packageTag"/>
<exclude name="PEAR.Commenting.ClassComment.Missing@authorTag"/>
<exclude name="PEAR.Commenting.ClassComment.Missing@licenseTag"/>
<exclude name="PEAR.Commenting.ClassComment.Missing@linkTag"/>
<!-- for phpcs == 2.2.0+ -->
<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>
<!-- ArrayDeclaration Linter -->
<rule ref="Squiz.Arrays.ArrayDeclaration" />
<rule ref="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed">
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned" >
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned" >
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed" >
<severity>0</severity>
</rule>
<rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned" >
<severity>0</severity>
</rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/TypeHints/DeclareStrictTypesSniff.php" />
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="newlinesCountBetweenOpenTagAndDeclare" value="2" />
<property name="spacesCountAroundEqualsSign" value="0" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"></rule>
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/Sniffs/Namespaces/UnusedUsesSniff.php">
<properties>
<property name="searchAnnotations" value="true"/>
</properties>
</rule>
<rule ref="PEAR.Commenting.FileComment">
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
<exclude name="PEAR.Commenting.FileComment.MissingTag"/>
<!-- for phpcs == 2.1.0 -->
<exclude name="PEAR.Commenting.FileComment.Missing@categoryTag"/>
<exclude name="PEAR.Commenting.FileComment.Missing@packageTag"/>
<exclude name="PEAR.Commenting.FileComment.Missing@authorTag"/>
<exclude name="PEAR.Commenting.FileComment.Missing@licenseTag"/>
<exclude name="PEAR.Commenting.FileComment.Missing@linkTag"/>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.