diff --git a/Makefile b/Makefile
index 7c6c5c69..95c866ff 100644
--- a/Makefile
+++ b/Makefile
@@ -21,14 +21,14 @@ update-compatibility-patch-74:
@git apply tests/php74-compatibility.patch
@printf "Please open your editor and apply your changes\n"
@until [ "$${compatibility_resolved}" == "y" ]; do read -p "Have finished your changes (y|n)? " compatibility_resolved; done && compatibility_resolved=
- @git diff -- tests/expected_report.txt tests/fixed > .tmp-patch && mv .tmp-patch tests/php74-compatibility.patch && git apply -R tests/php74-compatibility.patch
+ @git diff -- tests/expected_report.txt tests/fixed tests/input > .tmp-patch && mv .tmp-patch tests/php74-compatibility.patch && git apply -R tests/php74-compatibility.patch
@git commit -m 'Update compatibility patch' tests/php74-compatibility.patch
update-compatibility-patch-80:
@git apply tests/php80-compatibility.patch
@printf "Please open your editor and apply your changes\n"
@until [ "$${compatibility_resolved}" == "y" ]; do read -p "Have finished your changes (y|n)? " compatibility_resolved; done && compatibility_resolved=
- @git diff -- tests/expected_report.txt tests/fixed > .tmp-patch-80 && mv .tmp-patch-80 tests/php80-compatibility.patch && git apply -R tests/php80-compatibility.patch
+ @git diff -- tests/expected_report.txt tests/fixed tests/input > .tmp-patch-80 && mv .tmp-patch-80 tests/php80-compatibility.patch && git apply -R tests/php80-compatibility.patch
@git commit -m 'Update compatibility patch' tests/php80-compatibility.patch
vendor: composer.json
diff --git a/lib/Doctrine/ruleset.xml b/lib/Doctrine/ruleset.xml
index ae7ca301..b4a65632 100644
--- a/lib/Doctrine/ruleset.xml
+++ b/lib/Doctrine/ruleset.xml
@@ -284,6 +284,14 @@
+
+
+
+
+
+
+
+
diff --git a/tests/fixed/TrailingCommaOnFunctions.php b/tests/fixed/TrailingCommaOnFunctions.php
new file mode 100644
index 00000000..6e5cca4d
--- /dev/null
+++ b/tests/fixed/TrailingCommaOnFunctions.php
@@ -0,0 +1,17 @@
+property;
+$var = $object?->property;
+diff --git a/tests/fixed/return_type_on_closures.php b/tests/fixed/return_type_on_closures.php
+index 134bade..80ad413 100644
+--- a/tests/fixed/return_type_on_closures.php
++++ b/tests/fixed/return_type_on_closures.php
+@@ -22,7 +22,7 @@ static function (
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -31,7 +31,7 @@ static function (
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -40,7 +40,7 @@ static function (
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -49,7 +49,7 @@ static function (
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -58,6 +58,6 @@ static function (
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+diff --git a/tests/fixed/return_type_on_methods.php b/tests/fixed/return_type_on_methods.php
+index 8e2c6f7..0c897ae 100644
+--- a/tests/fixed/return_type_on_methods.php
++++ b/tests/fixed/return_type_on_methods.php
+@@ -31,7 +31,7 @@ class Test
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -40,7 +40,7 @@ class Test
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -49,7 +49,7 @@ class Test
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -58,7 +58,7 @@ class Test
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+
+@@ -67,7 +67,7 @@ class Test
+ int $c,
+ int $d,
+ int $e,
+- int $b
++ int $b,
+ ): void {
+ }
+ }
diff --git a/tests/fixed/type-hints.php b/tests/fixed/type-hints.php
-index 6033eca..5e26ed8 100644
+index 10e6f34..5e26ed8 100644
--- a/tests/fixed/type-hints.php
+++ b/tests/fixed/type-hints.php
@@ -10,7 +10,7 @@ use Traversable;
@@ -226,3 +336,16 @@ index 6033eca..5e26ed8 100644
- private $x = 1;
+ private int|string|null $x = 1;
}
+diff --git a/tests/input/TrailingCommaOnFunctions.php b/tests/input/TrailingCommaOnFunctions.php
+index ed304c9..e383ee2 100644
+--- a/tests/input/TrailingCommaOnFunctions.php
++++ b/tests/input/TrailingCommaOnFunctions.php
+@@ -6,7 +6,7 @@ namespace Doctrine;
+
+ class TrailingCommaOnFunctions
+ {
+- public function a(int $arg): void
++ public function a(int $arg,): void
+ {
+ }
+