Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Jan 5, 2023
1 parent ea1ece5 commit 2bfdf9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public static function verifyReturnType(
return null;
}


if ($return_type
&& $return_type->isNever()
&& !$inferred_yield_types
Expand Down Expand Up @@ -265,6 +264,7 @@ public static function verifyReturnType(

/**
* see https://github.com/vimeo/psalm/issues/9045
*
* @psalm-suppress InvalidArgument
*/
$inferred_return_type_with_never = Type::combineUnionTypeArray(
Expand Down Expand Up @@ -451,10 +451,10 @@ public static function verifyReturnType(
|| ($classlike_storage && $classlike_storage->final),
);

if (
(
!$inferred_return_type_parts
|| ($inferred_return_type->isVoid() && $function_returns_implicitly && count($inferred_return_type_parts) === 1)
if ((!$inferred_return_type_parts
|| ($inferred_return_type->isVoid()
&& $function_returns_implicitly
&& count($inferred_return_type_parts) === 1)
)
&& !$inferred_return_type->isNever()
&& !$inferred_yield_types
Expand Down

0 comments on commit 2bfdf9b

Please sign in to comment.