-
-
Notifications
You must be signed in to change notification settings - Fork 502
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
92 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ tests/PersistentCollections/* | |
phpunit.xml | ||
composer.lock | ||
vendor/ | ||
.phpcs-cache | ||
phpcs.xml |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<arg name="basepath" value="."/> | ||
<arg name="extensions" value="php"/> | ||
<arg name="parallel" value="80"/> | ||
<arg name="cache" value=".phpcs-cache"/> | ||
<arg name="colors" /> | ||
|
||
<!-- Ignore warnings and show progress of the run --> | ||
<arg value="np"/> | ||
|
||
<file>lib</file> | ||
<file>tests</file> | ||
<file>tools</file> | ||
|
||
<exclude-pattern>tests/Proxies*</exclude-pattern> | ||
<exclude-pattern>tests/Hydrators*</exclude-pattern> | ||
<exclude-pattern>tests/PersistentCollections*</exclude-pattern> | ||
|
||
<rule ref="Doctrine"> | ||
<!-- Traversable type hints often end up as mixed[], so we skip them for now --> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversablePropertyTypeHintSpecification" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification" /> | ||
|
||
<!-- Will cause BC breaks to method signatures - disabled for now --> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingParameterTypeHint" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingReturnTypeHint" /> | ||
|
||
<exclude name="Generic.Formatting.MultipleStatementAlignment" /> | ||
|
||
<!-- Disabled due to the large number of false positives in 4.4.4 --> | ||
<exclude name="SlevomatCodingStandard.Namespaces.UnusedUses.MismatchingCaseSensitivity" /> | ||
|
||
<!-- Disabled to avoid class renaming - to be handled in a separate PR --> | ||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming" /> | ||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousExceptionNaming" /> | ||
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming" /> | ||
|
||
<!-- The following rules are intended to be enabled one-by-one to have reviewable diffs --> | ||
|
||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedFOREACH" /> | ||
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIF" /> | ||
<exclude name="Generic.NamingConventions.UpperCaseConstantName.ConstantNotUpperCase" /> | ||
<exclude name="Generic.PHP.ForbiddenFunctions.Found" /> | ||
<exclude name="Generic.PHP.ForbiddenFunctions.FoundWithAlternative" /> | ||
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace" /> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" /> | ||
<exclude name="PSR2.ControlStructures.SwitchDeclaration.WrongOpenercase" /> | ||
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment" /> | ||
<exclude name="SlevomatCodingStandard.ControlStructures.AssignmentInCondition.AssignmentInCondition" /> | ||
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit" /> | ||
<exclude name="SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedMethod" /> | ||
<exclude name="SlevomatCodingStandard.Classes.UnusedPrivateElements.UnusedProperty" /> | ||
<exclude name="SlevomatCodingStandard.Classes.UnusedPrivateElements.WriteOnlyProperty" /> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingPropertyTypeHint" /> | ||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" /> | ||
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNotCapital" /> | ||
<exclude name="Squiz.Commenting.FunctionComment.ThrowsNoFullStop" /> | ||
<exclude name="Squiz.Commenting.FunctionComment.WrongStyle" /> | ||
<exclude name="Squiz.Classes.ClassFileName.NoMatch" /> | ||
<exclude name="Squiz.Scope.MethodScope.Missing" /> | ||
<exclude name="Squiz.Strings.DoubleQuoteUsage.ContainsVar" /> | ||
</rule> | ||
|
||
<!-- Require no space around colon in return types --> | ||
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"> | ||
<properties> | ||
<property name="spacesCountBeforeColon" value="0"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase"> | ||
<exclude-pattern>lib/Doctrine/ODM/MongoDB/Events.php</exclude-pattern> | ||
</rule> | ||
|
||
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses"> | ||
<exclude-pattern>*/tests/*</exclude-pattern> | ||
</rule> | ||
</ruleset> |