diff --git a/rules/TypeDeclaration/Rector/ClassMethod/NumericReturnTypeFromStrictScalarReturnsRector.php b/rules/TypeDeclaration/Rector/ClassMethod/NumericReturnTypeFromStrictScalarReturnsRector.php index b3f97f4079ea..7e1998cefa24 100644 --- a/rules/TypeDeclaration/Rector/ClassMethod/NumericReturnTypeFromStrictScalarReturnsRector.php +++ b/rules/TypeDeclaration/Rector/ClassMethod/NumericReturnTypeFromStrictScalarReturnsRector.php @@ -131,6 +131,16 @@ private function refactorBinaryOp(BinaryOp $binaryOp, $functionLike) $functionLike->returnType = new Identifier('float'); return $functionLike; } + if ($binaryOp instanceof Mul) { + if ($leftType instanceof FloatType && $rightType instanceof IntegerType) { + $functionLike->returnType = new Identifier('float'); + return $functionLike; + } + if ($leftType instanceof IntegerType && $rightType instanceof FloatType) { + $functionLike->returnType = new Identifier('float'); + return $functionLike; + } + } return null; } } diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 20b093176c56..3cb8b3e33832 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 = '0.17.2'; + public const PACKAGE_VERSION = '29dc5843a88dfec821312c9e2d1725e9cc57b9e2'; /** * @api * @var string */ - public const RELEASE_DATE = '2023-06-29 11:59:41'; + public const RELEASE_DATE = '2023-06-29 15:52:12'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index 17b281283a54..c0c1b2be8ca3 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -22,4 +22,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit39b19c6ab9850e9aad688cf1739f1ff6::getLoader(); +return ComposerAutoloaderInit0c8e28dd4c553e4c886bf58c80229b8a::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 774cb0a30bd4..8005c097d1b9 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit39b19c6ab9850e9aad688cf1739f1ff6 +class ComposerAutoloaderInit0c8e28dd4c553e4c886bf58c80229b8a { private static $loader; @@ -22,17 +22,17 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit39b19c6ab9850e9aad688cf1739f1ff6', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit0c8e28dd4c553e4c886bf58c80229b8a', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit39b19c6ab9850e9aad688cf1739f1ff6', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit0c8e28dd4c553e4c886bf58c80229b8a', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 51221e3a66b8..0188f9507913 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6 +class ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3098,9 +3098,9 @@ class ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit39b19c6ab9850e9aad688cf1739f1ff6::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit0c8e28dd4c553e4c886bf58c80229b8a::$classMap; }, null, ClassLoader::class); }