Updated Rector to commit bd478cc1b2fa2934e980e3d92c97a66ad7b260bd

bd478cc1b2 [PHPStanStaticTypeMapper] Improve UnionTypeMapper performance (#3686)
This commit is contained in:
Tomas Votruba 2023-04-25 21:31:09 +00:00
parent d4fe88d8f2
commit 1084c94b7d
5 changed files with 19 additions and 13 deletions

View File

@ -257,8 +257,14 @@ final class UnionTypeMapper implements TypeMapperInterface
$identifierNames[] = $type->toString();
}
}
if (!\in_array('bool', $identifierNames, \true)) {
return $phpParserUnionType;
}
if (!\in_array('false', $identifierNames, \true)) {
return $phpParserUnionType;
}
foreach ($phpParserUnionType->types as $key => $type) {
if ($type instanceof Identifier && \in_array('bool', $identifierNames, \true) && $type->toString() === 'false') {
if ($type instanceof Identifier && $type->toString() === 'false') {
unset($phpParserUnionType->types[$key]);
$phpParserUnionType->types = \array_values($phpParserUnionType->types);
return $phpParserUnionType;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '92d38cfba31d2a2811c19dd57810e296a725c91e';
public const PACKAGE_VERSION = 'bd478cc1b2fa2934e980e3d92c97a66ad7b260bd';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-26 03:57:38';
public const RELEASE_DATE = '2023-04-26 04:27:01';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit36da454820da7bd973f9c0cf95da646d::getLoader();
return ComposerAutoloaderInitaf71511c77a9e5e72ea77d280d03391c::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit36da454820da7bd973f9c0cf95da646d
class ComposerAutoloaderInitaf71511c77a9e5e72ea77d280d03391c
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit36da454820da7bd973f9c0cf95da646d
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit36da454820da7bd973f9c0cf95da646d', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitaf71511c77a9e5e72ea77d280d03391c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit36da454820da7bd973f9c0cf95da646d', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitaf71511c77a9e5e72ea77d280d03391c', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit36da454820da7bd973f9c0cf95da646d::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit36da454820da7bd973f9c0cf95da646d::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit36da454820da7bd973f9c0cf95da646d
class ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3150,9 +3150,9 @@ class ComposerStaticInit36da454820da7bd973f9c0cf95da646d
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit36da454820da7bd973f9c0cf95da646d::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit36da454820da7bd973f9c0cf95da646d::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit36da454820da7bd973f9c0cf95da646d::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitaf71511c77a9e5e72ea77d280d03391c::$classMap;
}, null, ClassLoader::class);
}