diff --git a/tests/expected_report.txt b/tests/expected_report.txt index 1d5a7d3a..d32df4e9 100644 --- a/tests/expected_report.txt +++ b/tests/expected_report.txt @@ -16,6 +16,7 @@ tests/input/doc-comment-spacing.php 11 0 tests/input/duplicate-assignment-variable.php 1 0 tests/input/EarlyReturn.php 6 0 tests/input/example-class.php 38 0 +tests/input/ExampleBackedEnum.php 0 0 tests/input/forbidden-comments.php 14 0 tests/input/forbidden-functions.php 6 0 tests/input/inline_type_hint_assertions.php 7 0 @@ -46,7 +47,7 @@ tests/input/use-ordering.php 1 0 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- -A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES +A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES ---------------------------------------------------------------------- PHPCBF CAN FIX 315 OF THESE SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------- diff --git a/tests/php73-compatibility.patch b/tests/php73-compatibility.patch index 8e056058..a9db211a 100644 --- a/tests/php73-compatibility.patch +++ b/tests/php73-compatibility.patch @@ -14,8 +14,8 @@ index 1d5a7d3..fae9e70 100644 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- --A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES -+A TOTAL OF 383 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES +-A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES ++A TOTAL OF 383 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 315 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 317 OF THESE SNIFF VIOLATIONS AUTOMATICALLY diff --git a/tests/php74-compatibility.patch b/tests/php74-compatibility.patch index 55366f8b..f0189b1f 100644 --- a/tests/php74-compatibility.patch +++ b/tests/php74-compatibility.patch @@ -36,8 +36,8 @@ index 1d5a7d3..91e97e7 100644 tests/input/useless-semicolon.php 2 0 tests/input/UselessConditions.php 20 0 ---------------------------------------------------------------------- --A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES -+A TOTAL OF 392 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES +-A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES ++A TOTAL OF 392 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 315 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 326 OF THESE SNIFF VIOLATIONS AUTOMATICALLY diff --git a/tests/php80-compatibility.patch b/tests/php80-compatibility.patch index c6923131..3192b6f1 100644 --- a/tests/php80-compatibility.patch +++ b/tests/php80-compatibility.patch @@ -49,8 +49,8 @@ index 1d5a7d3..03460f2 100644 -tests/input/UselessConditions.php 20 0 +tests/input/UselessConditions.php 21 0 ---------------------------------------------------------------------- --A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES -+A TOTAL OF 420 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES +-A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES ++A TOTAL OF 420 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 315 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 354 OF THESE SNIFF VIOLATIONS AUTOMATICALLY diff --git a/tests/php81-compatibility.patch b/tests/php81-compatibility.patch index 771076f7..bd8787cc 100644 --- a/tests/php81-compatibility.patch +++ b/tests/php81-compatibility.patch @@ -49,8 +49,8 @@ index 1d5a7d3..a10bb10 100644 -tests/input/UselessConditions.php 20 0 +tests/input/UselessConditions.php 21 0 ---------------------------------------------------------------------- --A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 42 FILES -+A TOTAL OF 423 ERRORS AND 0 WARNINGS WERE FOUND IN 44 FILES +-A TOTAL OF 381 ERRORS AND 0 WARNINGS WERE FOUND IN 43 FILES ++A TOTAL OF 423 ERRORS AND 0 WARNINGS WERE FOUND IN 45 FILES ---------------------------------------------------------------------- -PHPCBF CAN FIX 315 OF THESE SNIFF VIOLATIONS AUTOMATICALLY +PHPCBF CAN FIX 357 OF THESE SNIFF VIOLATIONS AUTOMATICALLY @@ -70,6 +70,18 @@ index caf1dbb..fc734db 100644 { foreach ($items as $item) { if (! $item->isItem()) { +diff --git a/tests/fixed/ExampleBackedEnum.php b/tests/fixed/ExampleBackedEnum.php +index fe54eb9..cc38c54 100644 +--- a/tests/fixed/ExampleBackedEnum.php ++++ b/tests/fixed/ExampleBackedEnum.php +@@ -3,3 +3,7 @@ + declare(strict_types=1); + + namespace ExampleBackedEnum; ++ ++enum ExampleBackedEnum: int ++{ ++} diff --git a/tests/fixed/NamingCamelCase.php b/tests/fixed/NamingCamelCase.php index 57d9f2b..5493471 100644 --- a/tests/fixed/NamingCamelCase.php @@ -395,6 +407,18 @@ index 10e6f34..5e26ed8 100644 - private $x = 1; + private int|string|null $x = 1; } +diff --git a/tests/input/ExampleBackedEnum.php b/tests/input/ExampleBackedEnum.php +index fe54eb9..0c47286 100644 +--- a/tests/input/ExampleBackedEnum.php ++++ b/tests/input/ExampleBackedEnum.php +@@ -3,3 +3,7 @@ + declare(strict_types=1); + + namespace ExampleBackedEnum; ++ ++enum ExampleBackedEnum : int ++{ ++} diff --git a/tests/input/PropertyDeclaration.php b/tests/input/PropertyDeclaration.php index 0891e12..acdc445 100644 --- a/tests/input/PropertyDeclaration.php