From b955cd255dd2dcdfbe38e4de6bf12e309cfb5a37 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 18 Aug 2023 19:04:36 +0700 Subject: [PATCH] use exact return union --- .../PHPUnit90/Rector/MethodCall/ExplicitPhpErrorApiRector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/PHPUnit90/Rector/MethodCall/ExplicitPhpErrorApiRector.php b/rules/PHPUnit90/Rector/MethodCall/ExplicitPhpErrorApiRector.php index 6104a4fc..cf1f6fda 100644 --- a/rules/PHPUnit90/Rector/MethodCall/ExplicitPhpErrorApiRector.php +++ b/rules/PHPUnit90/Rector/MethodCall/ExplicitPhpErrorApiRector.php @@ -86,7 +86,7 @@ public function getNodeTypes(): array /** * @param MethodCall|StaticCall $node */ - public function refactor(Node $node): ?Node + public function refactor(Node $node): null|MethodCall|StaticCall { if (! $this->testsNodeAnalyzer->isPHPUnitMethodCallNames($node, ['expectException'])) { return null; @@ -106,7 +106,7 @@ private function replaceExceptionWith( MethodCall|StaticCall $node, string $exceptionClass, string $explicitMethod - ): ?Node { + ): null|MethodCall|StaticCall { if ($node->isFirstClassCallable()) { return null; }