From 2bc330976f87092d4b39275a03168b92c4f2fefe Mon Sep 17 00:00:00 2001 From: tuqqu Date: Wed, 4 Oct 2023 21:18:59 +0200 Subject: [PATCH] Add tests for never return type --- tests/ReturnTypeTest.php | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/tests/ReturnTypeTest.php b/tests/ReturnTypeTest.php index 2557fdf8a..3bc88b760 100644 --- a/tests/ReturnTypeTest.php +++ b/tests/ReturnTypeTest.php @@ -1279,6 +1279,26 @@ class ReturnTypeTest extends TestCase return $t; }', ], + 'neverReturnType' => [ + 'code' => ' [], + 'ignored_issues' => [], + 'php_version' => '8.1', + ], ]; } @@ -1807,6 +1827,36 @@ class ReturnTypeTest extends TestCase 'ignored_issues' => [], 'php_version' => '8.0', ], + 'implicitReturnFromFunctionWithNeverReturnType' => [ + 'code' => <<<'PHP' + 'InvalidReturnType', + 'ignored_issues' => [], + 'php_version' => '8.1', + ], + 'implicitReturnFromFunctionWithNeverReturnType2' => [ + 'code' => <<<'PHP' + 'InvalidReturnType', + 'ignored_issues' => [], + 'php_version' => '8.1', + ], ]; } }