2017-11-18 21:58:26 +01:00
|
|
|
<?xml version="1.0"?>
|
2022-02-02 01:38:03 +01:00
|
|
|
<ruleset name="PHPStan deprecation rules">
|
2022-03-28 10:02:03 +02:00
|
|
|
<config name="php_version" value="70200"/>
|
2021-05-15 00:50:10 +02:00
|
|
|
<arg name="colors"/>
|
|
|
|
<arg name="extensions" value="php"/>
|
|
|
|
<arg name="encoding" value="utf-8"/>
|
|
|
|
<arg name="tab-width" value="4"/>
|
|
|
|
<arg name="cache" value="tmp/cache/phpcs"/>
|
|
|
|
<arg value="sp"/>
|
|
|
|
<file>src</file>
|
|
|
|
<file>tests</file>
|
2022-02-02 01:38:03 +01:00
|
|
|
|
2021-03-18 21:54:00 +01:00
|
|
|
<rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
|
2019-04-23 21:27:03 +02:00
|
|
|
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.InvalidFormat"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<exclude name="SlevomatCodingStandard.Commenting.InlineDocCommentDeclaration.MissingVariable"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<exclude name="Consistence.Exceptions.ExceptionDeclaration"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<exclude name="Squiz.Commenting.FunctionComment"/>
|
|
|
|
<exclude name="Squiz.PHP.Heredoc.NotAllowed"/>
|
|
|
|
<exclude name="Squiz.WhiteSpace.FunctionSpacing.Before"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar"/>
|
2017-11-18 21:58:26 +01:00
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses">
|
|
|
|
<properties>
|
|
|
|
<property name="caseSensitive" value="false"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<property name="psr12Compatible" value="true"/>
|
2017-11-18 21:58:26 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
|
|
|
<properties>
|
2022-02-02 01:38:03 +01:00
|
|
|
<property name="declareOnFirstLine" value="true"/>
|
2017-11-18 21:58:26 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
2021-02-08 12:07:58 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint">
|
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingTraversableTypeHintSpecification"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint"/>
|
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation">
|
|
|
|
<severity>10</severity>
|
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint">
|
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
|
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.UselessAnnotation">
|
|
|
|
<severity>10</severity>
|
2021-02-08 12:07:58 +01:00
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint">
|
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingAnyTypeHint"/>
|
|
|
|
<exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint"/>
|
|
|
|
</rule>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation">
|
|
|
|
<severity>10</severity>
|
2019-04-23 21:27:03 +02:00
|
|
|
</rule>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure.UnusedInheritedVariable"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Exceptions.ReferenceThrowableOnly.ReferencedGeneralException"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
|
|
|
|
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit.UselessElseIf"/>
|
|
|
|
</rule>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Files.TypeNameMatchesFileName">
|
|
|
|
<properties>
|
2022-02-02 01:38:03 +01:00
|
|
|
<property name="rootNamespaces" type="array">
|
|
|
|
<element key="src" value="PHPStan\PhpDocParser"/>
|
|
|
|
<element key="tests/PHPStan" value="PHPStan\PhpDocParser"/>
|
|
|
|
</property>
|
|
|
|
|
2017-11-18 21:58:26 +01:00
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.Classes.ModernClassNameReference"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Functions.StaticClosure"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.Operators.RequireCombinedAssignmentOperator"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Classes.TraitUseDeclaration"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Classes.TraitUseSpacing"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
|
|
|
|
<!--<rule ref="SlevomatCodingStandard.Functions.UnusedParameter"/>-->
|
|
|
|
<rule ref="SlevomatCodingStandard.Functions.UnusedInheritedVariablePassedToClosure"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
|
|
|
|
<properties>
|
|
|
|
<property name="searchAnnotations" value="true"/>
|
|
|
|
<property name="namespacesRequiredToUse" value=""/>
|
|
|
|
<property name="allowPartialUses" value="true"/>
|
|
|
|
<property name="allowFallbackGlobalFunctions" value="false"/>
|
|
|
|
<property name="allowFallbackGlobalConstants" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedExceptions" value="false"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingClasses" value="true"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingFunctions" value="true"/>
|
|
|
|
<property name="allowFullyQualifiedNameForCollidingConstants" value="true"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UselessAlias"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
|
|
|
|
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
|
2022-02-02 01:38:03 +01:00
|
|
|
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
|
|
|
|
<properties>
|
|
|
|
<property name="spacing" value="1" />
|
|
|
|
<property name="spacingBeforeFirst" value="1"/>
|
|
|
|
<property name="spacingAfterLast" value="1"/>
|
|
|
|
</properties>
|
|
|
|
</rule>
|
|
|
|
<rule ref="PSR1.Methods.CamelCapsMethodName.NotCamelCaps"/>
|
|
|
|
<rule ref="Consistence.NamingConventions.ValidVariableName.NotCamelCaps"/>
|
2019-04-23 21:27:03 +02:00
|
|
|
<exclude-pattern>tests/*/data</exclude-pattern>
|
2017-11-18 21:58:26 +01:00
|
|
|
</ruleset>
|