Skip to content

Commit

Permalink
use exact return union
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Aug 18, 2023
1 parent 1734611 commit b955cd2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -106,7 +106,7 @@ private function replaceExceptionWith(
MethodCall|StaticCall $node,
string $exceptionClass,
string $explicitMethod
): ?Node {
): null|MethodCall|StaticCall {
if ($node->isFirstClassCallable()) {
return null;
}
Expand Down

0 comments on commit b955cd2

Please sign in to comment.