Skip to content

Instantly share code, notes, and snippets.

@beberlei
Created February 9, 2019 18:14
Show Gist options
  • Save beberlei/60debba0e1fa3580d5e7613535710f82 to your computer and use it in GitHub Desktop.
Save beberlei/60debba0e1fa3580d5e7613535710f82 to your computer and use it in GitHub Desktop.
Tideways phpcs.xml
<?xml version="1.0"?>
<ruleset>
<arg name="basepath" value="."/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="6"/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<!-- Ignore warnings, show progress of the run and show sniff names -->
<arg value="nps"/>
<!--<file>....</file>-->
<exclude-pattern>./vendor/*</exclude-pattern>
<!-- Include full Doctrine Coding Standard -->
<rule ref="Doctrine">
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSame" />
<exclude name="Generic.Formatting.SpaceAfterNot.Incorrect" />
<exclude name="SlevomatCodingStandard.TypeHints.DeclareStrictTypes" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint" />
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName" />
<exclude name="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses" />
<exclude name="SlevomatCodingStandard.Functions.StaticClosure.ClosureNotStatic" />
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit" />
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" />
<exclude name="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators" />
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment" />
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming" />
<exclude name="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly" />
<exclude name="Squiz.Strings.DoubleQuoteUsage.NotRequired" />
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" />
<exclude name="Squiz.Arrays.ArrayDeclaration.NoComma" />
<!-- Add back ta some point -->
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification" />
<exclude name="SlevomatCodingStandard.Classes.ClassConstantVisibility.MissingConstantVisibility" />
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration">
<properties>
<property name="usefulAnnotations" type="array" value="
@see,
@throws,
@dataProvider,
@test,
@suppress
"/>
</properties>
</rule>
</ruleset>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment