From 4b26a2ea4f81baa1a55e8714a18976656892f70d Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Sun, 23 Apr 2023 15:42:48 -0300 Subject: [PATCH] Configure "SlevomatCodingStandard.Commenting.AnnotationName" rule --- lib/Doctrine/ruleset.xml | 2 ++ tests/expected_report.txt | 7 ++++--- tests/fixed/annotation-name.php | 29 +++++++++++++++++++++++++++++ tests/input/annotation-name.php | 29 +++++++++++++++++++++++++++++ tests/php72-compatibility.patch | 12 ++++++------ tests/php73-compatibility.patch | 12 ++++++------ tests/php74-compatibility.patch | 12 ++++++------ tests/php80-compatibility.patch | 14 +++++++------- 8 files changed, 89 insertions(+), 28 deletions(-) create mode 100644 tests/fixed/annotation-name.php create mode 100644 tests/input/annotation-name.php diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index ed99bc4e..6a8f667d 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -181,6 +181,8 @@ + + diff --git a/tests/expected_report.txt b/tests/expected_report.txt index 17734237..814a2c3e 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -3,12 +3,13 @@ PHP CODE SNIFFER REPORT SUMMARY ---------------------------------------------------------------------- FILE ERRORS WARNINGS ---------------------------------------------------------------------- +tests/input/annotation-name.php 8 0 tests/input/array_indentation.php 10 0 tests/input/arrow-functions-format.php 10 0 tests/input/assignment-operators.php 4 0 tests/input/attributes.php 15 0 tests/input/binary_operators.php 9 0 -tests/input/class-references.php 10 0 +tests/input/class-references.php 10 2 tests/input/ClassPropertySpacing.php 2 0 tests/input/concatenation_spacing.php 49 0 tests/input/constants-no-lsb.php 2 0 @@ -52,9 +53,9 @@ tests/input/use-ordering.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 21 0 ---------------------------------------------------------------------- -A TOTAL OF 453 ERRORS AND 0 WARNINGS WERE FOUND IN 48 FILES +A TOTAL OF 461 ERRORS AND 2 WARNINGS WERE FOUND IN 49 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 375 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 377 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/fixed/annotation-name.php b/tests/fixed/annotation-name.php new file mode 100644 index 00000000..6596c306 --- /dev/null +++ b/tests/fixed/annotation-name.php @@ -0,0 +1,29 @@ +