diff --git a/packages/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php b/packages/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php index cc63c37e16c..b0612c959b7 100644 --- a/packages/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php +++ b/packages/PHPStanStaticTypeMapper/TypeMapper/UnionTypeMapper.php @@ -142,7 +142,7 @@ final class UnionTypeMapper implements TypeMapperInterface } return $this->mapNullabledType($nullabledType, $typeKind); } - /** + /** * @param TypeKind::* $typeKind */ private function mapNullabledType(Type $nullabledType, string $typeKind) : ?Node diff --git a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php index 40a6473bb49..1030d43f0f8 100644 --- a/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php +++ b/rules/Php81/Rector/FuncCall/NullToStrictStringFuncCallArgRector.php @@ -214,7 +214,7 @@ CODE_SAMPLE return []; } $parametersAcceptor = ParametersAcceptorSelectorVariantsWrapper::select($functionReflection, $funcCall, $scope); - $functionName = $this->nodeNameResolver->getName($funcCall); + $functionName = $functionReflection->getName(); $argNames = self::ARG_POSITION_NAME_NULL_TO_STRICT_STRING[$functionName]; $positions = []; foreach ($parametersAcceptor->getParameters() as $position => $parameterReflection) { diff --git a/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php b/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php index 2054f0262ac..97476df0981 100644 --- a/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php +++ b/rules/TypeDeclaration/TypeAnalyzer/AlwaysStrictScalarExprAnalyzer.php @@ -53,7 +53,7 @@ final class AlwaysStrictScalarExprAnalyzer } if ($expr instanceof FuncCall) { $returnType = $this->resolveFuncCallType($expr); - if ($returnType === null) { + if (!$returnType instanceof Type) { return null; } if (!$this->isScalarType($returnType)) { @@ -74,10 +74,7 @@ final class AlwaysStrictScalarExprAnalyzer if ($type instanceof IntegerType) { return \true; } - if ($type instanceof BooleanType) { - return \true; - } - return \false; + return $type instanceof BooleanType; } private function resolveTypeFromScalar(Scalar $scalar) : ?\PHPStan\Type\Type { diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 0c3f0efd313..00164af4354 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -17,12 +17,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = '54cc8e7a839343023a10a4ee230b9973dd03c376'; + public const PACKAGE_VERSION = '429c9c087662fbd35e10e5d044b63aabfb1872f7'; /** * @api * @var string */ - public const RELEASE_DATE = '2022-09-23 14:59:11'; + public const RELEASE_DATE = '2022-09-24 10:47:33'; /** * @var int */ diff --git a/vendor/autoload.php b/vendor/autoload.php index dd74d4dbcfe..81b7eb2dcb4 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a::getLoader(); +return ComposerAutoloaderInit247db331a5618be99e25f95e6b97bbb2::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 62020021ae0..df9c5b58974 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a +class ComposerAutoloaderInit247db331a5618be99e25f95e6b97bbb2 { private static $loader; @@ -22,19 +22,19 @@ class ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit247db331a5618be99e25f95e6b97bbb2', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit247db331a5618be99e25f95e6b97bbb2', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit247db331a5618be99e25f95e6b97bbb2::getInitializer($loader)); $loader->setClassMapAuthoritative(true); $loader->register(true); - $includeFiles = \Composer\Autoload\ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a::$files; + $includeFiles = \Composer\Autoload\ComposerStaticInit247db331a5618be99e25f95e6b97bbb2::$files; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirea2b31b9158f64e76ddef912f18cd5d8a($fileIdentifier, $file); + composerRequire247db331a5618be99e25f95e6b97bbb2($fileIdentifier, $file); } return $loader; @@ -46,7 +46,7 @@ class ComposerAutoloaderInita2b31b9158f64e76ddef912f18cd5d8a * @param string $file * @return void */ -function composerRequirea2b31b9158f64e76ddef912f18cd5d8a($fileIdentifier, $file) +function composerRequire247db331a5618be99e25f95e6b97bbb2($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 f364b056b9e..ee9163d9508 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a +class ComposerStaticInit247db331a5618be99e25f95e6b97bbb2 { public static $files = array ( 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', @@ -3107,9 +3107,9 @@ class ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInita2b31b9158f64e76ddef912f18cd5d8a::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit247db331a5618be99e25f95e6b97bbb2::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit247db331a5618be99e25f95e6b97bbb2::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit247db331a5618be99e25f95e6b97bbb2::$classMap; }, null, ClassLoader::class); }