mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 99a79f8df18f4202f7c939b7996b9714abb78fe4
99a79f8df1
[TypeDeclaration] Fix abs() returns on ReturnTypeFromStrictTypedCallRector (#5652)
This commit is contained in:
parent
dc98feb11d
commit
283153802a
|
@ -3,6 +3,7 @@
|
|||
declare (strict_types=1);
|
||||
namespace Rector\TypeDeclaration\TypeAnalyzer;
|
||||
|
||||
use PHPStan\Reflection\ParametersAcceptorSelector;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Expr\Array_;
|
||||
|
@ -98,12 +99,12 @@ final class ReturnStrictTypeAnalyzer
|
|||
if ($methodReflection === null) {
|
||||
return null;
|
||||
}
|
||||
$parametersAcceptor = $methodReflection->getVariants()[0];
|
||||
if ($parametersAcceptor instanceof FunctionVariantWithPhpDocs) {
|
||||
$parametersAcceptorWithPhpDocs = ParametersAcceptorSelector::combineAcceptors($methodReflection->getVariants());
|
||||
if ($parametersAcceptorWithPhpDocs instanceof FunctionVariantWithPhpDocs) {
|
||||
// native return type is needed, as docblock can be false
|
||||
$returnType = $parametersAcceptor->getNativeReturnType();
|
||||
$returnType = $parametersAcceptorWithPhpDocs->getNativeReturnType();
|
||||
} else {
|
||||
$returnType = $parametersAcceptor->getReturnType();
|
||||
$returnType = $parametersAcceptorWithPhpDocs->getReturnType();
|
||||
}
|
||||
if ($returnType instanceof MixedType) {
|
||||
return null;
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '290926cc8b93331dd715d7ea061847dafbc1821a';
|
||||
public const PACKAGE_VERSION = '99a79f8df18f4202f7c939b7996b9714abb78fe4';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-02-21 15:28:36';
|
||||
public const RELEASE_DATE = '2024-02-21 23:16:34';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue