diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index d841c154..35716c0e 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -397,6 +397,9 @@ + + + @@ -407,6 +410,9 @@ + + + @@ -418,6 +424,9 @@ + + + diff --git a/tests/expected_report.txt b/tests/expected_report.txt index c6449260..032076d1 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -39,13 +39,12 @@ tests/input/superfluous-naming.php 11 0 tests/input/test-case.php 8 0 tests/input/trailing_comma_on_array.php 1 0 tests/input/traits-uses.php 11 0 -tests/input/type-hints.php 4 0 tests/input/UnusedVariables.php 1 0 tests/input/use-ordering.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- -A TOTAL OF 377 ERRORS AND 0 WARNINGS WERE FOUND IN 41 FILES +A TOTAL OF 373 ERRORS AND 0 WARNINGS WERE FOUND IN 40 FILES ---------------------------------------------------------------------- PHPCBF CAN FIX 313 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/fixed/type-hints.php b/tests/fixed/type-hints.php deleted file mode 100644 index 0e952fce..00000000 --- a/tests/fixed/type-hints.php +++ /dev/null @@ -1,24 +0,0 @@ -parameter; - } -} diff --git a/tests/input/type-hints.php b/tests/input/type-hints.php deleted file mode 100644 index 0e952fce..00000000 --- a/tests/input/type-hints.php +++ /dev/null @@ -1,24 +0,0 @@ -parameter; - } -} diff --git a/tests/php74-compatibility.patch b/tests/php74-compatibility.patch index 1301ea75..92ef61f3 100644 --- a/tests/php74-compatibility.patch +++ b/tests/php74-compatibility.patch @@ -7,7 +7,7 @@ index fd5432c..233e24d 100644 tests/input/duplicate-assignment-variable.php 1 0 tests/input/EarlyReturn.php 6 0 -tests/input/example-class.php 38 0 -+tests/input/example-class.php 41 0 ++tests/input/example-class.php 39 0 tests/input/forbidden-comments.php 14 0 tests/input/forbidden-functions.php 6 0 tests/input/inline_type_hint_assertions.php 7 0 @@ -23,22 +23,20 @@ index fd5432c..233e24d 100644 tests/input/null_coalesce_operator.php 3 0 tests/input/optimized-functions.php 1 0 tests/input/PropertyTypeHintSpacing.php 6 0 -@@ -39,15 +39,15 @@ tests/input/superfluous-naming.php 11 0 +@@ -39,14 +39,14 @@ tests/input/superfluous-naming.php 11 0 tests/input/test-case.php 8 0 tests/input/trailing_comma_on_array.php 1 0 tests/input/traits-uses.php 11 0 --tests/input/type-hints.php 4 0 -+tests/input/type-hints.php 5 0 tests/input/UnusedVariables.php 1 0 tests/input/use-ordering.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- --A TOTAL OF 377 ERRORS AND 0 WARNINGS WERE FOUND IN 41 FILES -+A TOTAL OF 386 ERRORS AND 0 WARNINGS WERE FOUND IN 41 FILES +-A TOTAL OF 373 ERRORS AND 0 WARNINGS WERE FOUND IN 40 FILES ++A TOTAL OF 379 ERRORS AND 0 WARNINGS WERE FOUND IN 40 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 313 OF THESE SNIFF VIOLATIONS AUTOMATICALLY -+PHPCBF CAN FIX 322 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ++PHPCBF CAN FIX 321 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- @@ -110,17 +108,4 @@ index 8846dd1..51c361c 100644 +$bar ??= 'bar'; $bar = $bar['baz'] ?? 'baz'; - -diff --git a/tests/fixed/type-hints.php b/tests/fixed/type-hints.php -index 0e952fc..9824fb0 100644 ---- a/tests/fixed/type-hints.php -+++ b/tests/fixed/type-hints.php -@@ -10,7 +10,7 @@ use Traversable; - class TraversableTypeHints - { - /** @var Traversable */ -- private $parameter; -+ private Traversable $parameter; - - /** - * @param Iterator $iterator + diff --git a/tests/php80-compatibility.patch b/tests/php80-compatibility.patch index 7cceac94..30a4873b 100644 --- a/tests/php80-compatibility.patch +++ b/tests/php80-compatibility.patch @@ -7,7 +7,7 @@ index c644926..d0f0a44 100644 tests/input/duplicate-assignment-variable.php 1 0 tests/input/EarlyReturn.php 6 0 -tests/input/example-class.php 38 0 -+tests/input/example-class.php 42 0 ++tests/input/example-class.php 40 0 tests/input/forbidden-comments.php 14 0 tests/input/forbidden-functions.php 6 0 tests/input/inline_type_hint_assertions.php 7 0 @@ -26,22 +26,20 @@ index c644926..d0f0a44 100644 tests/input/optimized-functions.php 1 0 tests/input/PropertyTypeHintSpacing.php 6 0 tests/input/return_type_on_closures.php 21 0 -@@ -39,15 +40,15 @@ tests/input/superfluous-naming.php 11 0 +@@ -39,14 +40,14 @@ tests/input/superfluous-naming.php 11 0 tests/input/test-case.php 8 0 tests/input/trailing_comma_on_array.php 1 0 tests/input/traits-uses.php 11 0 --tests/input/type-hints.php 4 0 -+tests/input/type-hints.php 5 0 tests/input/UnusedVariables.php 1 0 tests/input/use-ordering.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- --A TOTAL OF 377 ERRORS AND 0 WARNINGS WERE FOUND IN 41 FILES -+A TOTAL OF 391 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES +-A TOTAL OF 373 ERRORS AND 0 WARNINGS WERE FOUND IN 40 FILES ++A TOTAL OF 384 ERRORS AND 0 WARNINGS WERE FOUND IN 41 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 313 OF THESE SNIFF VIOLATIONS AUTOMATICALLY -+PHPCBF CAN FIX 327 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ++PHPCBF CAN FIX 326 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- @@ -150,16 +148,3 @@ index 5bbb636..7ce8a3d 100644 -$var = $object === null ? null : $object->property; +$var = $object?->property; -diff --git a/tests/fixed/type-hints.php b/tests/fixed/type-hints.php -index 0e952fc..9824fb0 100644 ---- a/tests/fixed/type-hints.php -+++ b/tests/fixed/type-hints.php -@@ -10,7 +10,7 @@ use Traversable; - class TraversableTypeHints - { - /** @var Traversable */ -- private $parameter; -+ private Traversable $parameter; - - /** - * @param Iterator $iterator