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