diff --git a/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php b/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php index 5f38a0b6ae8..0cc79cacf24 100644 --- a/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php +++ b/rules/TypeDeclaration/TypeAnalyzer/ReturnStrictTypeAnalyzer.php @@ -21,6 +21,7 @@ use PHPStan\Analyser\Scope; use PHPStan\Reflection\ClassReflection; use PHPStan\Reflection\Native\NativeFunctionReflection; +use PHPStan\Reflection\Native\NativeMethodReflection; use PHPStan\Reflection\ParametersAcceptorWithPhpDocs; use PHPStan\Type\MixedType; use PHPStan\Type\StaticType; @@ -117,7 +118,7 @@ public function resolveMethodCallReturnType($call) : ?Type return null; } $parametersAcceptorWithPhpDocs = ParametersAcceptorSelectorVariantsWrapper::select($methodReflection, $call, $scope); - if ($methodReflection instanceof NativeFunctionReflection) { + if ($methodReflection instanceof NativeFunctionReflection || $methodReflection instanceof NativeMethodReflection) { $returnType = $parametersAcceptorWithPhpDocs->getReturnType(); } elseif ($parametersAcceptorWithPhpDocs instanceof ParametersAcceptorWithPhpDocs) { // native return type is needed, as docblock can be false diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 0421d536241..24702381408 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'd17d3e814eada2fa3ada3601034407df01d84568'; + public const PACKAGE_VERSION = '0c9edebe4e1ca753d5bbe99e5109378155e87dde'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-10-01 20:02:39'; + public const RELEASE_DATE = '2024-10-01 20:52:27'; /** * @var int */