1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

code style

This commit is contained in:
kkmuffme 2023-01-04 01:00:31 +01:00
parent ea1ece5cd0
commit 2bfdf9bc68

View File

@ -215,7 +215,6 @@ class ReturnTypeAnalyzer
return null;
}
if ($return_type
&& $return_type->isNever()
&& !$inferred_yield_types
@ -265,6 +264,7 @@ class ReturnTypeAnalyzer
/**
* see https://github.com/vimeo/psalm/issues/9045
*
* @psalm-suppress InvalidArgument
*/
$inferred_return_type_with_never = Type::combineUnionTypeArray(
@ -451,10 +451,10 @@ class ReturnTypeAnalyzer
|| ($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