diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ac90bcf --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +check: test lint + +test: + bin/phpunit + +lint: codestyle static-analysis + +fix: + bin/phpcbf + +codestyle: + bin/phpcs + +static-analysis: + bin/phpstan diff --git a/PreviousNextDrupal/ruleset.xml b/PreviousNextDrupal/ruleset.xml index 4139f57..3e140c8 100644 --- a/PreviousNextDrupal/ruleset.xml +++ b/PreviousNextDrupal/ruleset.xml @@ -33,6 +33,9 @@ + + + diff --git a/README.md b/README.md index e1d6ee8..aad81d2 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ function doesAThing(array $data): int { #### PSR2.Methods.FunctionClosingBrace.SpacingBeforeClose #### SlevomatCodingStandard.Classes.ClassStructure #### SlevomatCodingStandard.Classes.RequireMultiLineMethodSignature +#### SlevomatCodingStandard.Commenting.UselessInheritDocComment #### SlevomatCodingStandard.Functions.RequireTrailingCommaInCall #### SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration #### SlevomatCodingStandard.Functions.StaticClosure diff --git a/tests/Sniffs/UselessInheritDocCommentTest.php b/tests/Sniffs/UselessInheritDocCommentTest.php new file mode 100644 index 0000000..e924ea6 --- /dev/null +++ b/tests/Sniffs/UselessInheritDocCommentTest.php @@ -0,0 +1,29 @@ +getErrorCount()); + self::assertSniffError($report, 14, UselessInheritDocCommentSniff::CODE_USELESS_INHERIT_DOC_COMMENT); + } + + protected static function getSniffName(): string { + return 'SlevomatCodingStandard.Commenting.UselessInheritDocComment'; + } + +} diff --git a/tests/Sniffs/fixtures/UselessInheritDocCommentError.php b/tests/Sniffs/fixtures/UselessInheritDocCommentError.php new file mode 100644 index 0000000..d03f5c4 --- /dev/null +++ b/tests/Sniffs/fixtures/UselessInheritDocCommentError.php @@ -0,0 +1,21 @@ +