diff --git a/composer.json b/composer.json index 7fe20174..10247259 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "require": { "php": "^7.2 || ^8.0", "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", - "slevomat/coding-standard": "^8.1", + "slevomat/coding-standard": "^8.2", "squizlabs/php_codesniffer": "^3.7" }, "config": { diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml index 71cacee4..abc6fb9b 100644 --- a/lib/Doctrine/ruleset.xml +++ b/lib/Doctrine/ruleset.xml @@ -114,6 +114,8 @@ + + diff --git a/tests/fixed/ExampleBackedEnum.php b/tests/fixed/ExampleBackedEnum.php new file mode 100644 index 00000000..fe54eb97 --- /dev/null +++ b/tests/fixed/ExampleBackedEnum.php @@ -0,0 +1,5 @@ +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 +408,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