Updated Rector to commit cd405e6512348d27c2494e9164652b405542e1c8

cd405e6512 [TypeDeclaration] Ensure return  only when changed on AddParamTypeDeclarationRector (#2399)
This commit is contained in:
Tomas Votruba 2022-05-31 12:43:03 +00:00
parent 38c15a123c
commit f219c9f429
6 changed files with 27 additions and 19 deletions

View File

@ -31,6 +31,10 @@ final class AddParamTypeDeclarationRector extends \Rector\Core\Rector\AbstractRe
* @var AddParamTypeDeclaration[]
*/
private $addParamTypeDeclarations = [];
/**
* @var bool
*/
private $hasChanged = \false;
/**
* @readonly
* @var \Rector\NodeTypeResolver\TypeComparator\TypeComparator
@ -92,6 +96,9 @@ CODE_SAMPLE
}
$this->refactorClassMethodWithTypehintByParameterPosition($node, $addParamTypeDeclaration);
}
if (!$this->hasChanged) {
return null;
}
return $node;
}
/**
@ -145,6 +152,7 @@ CODE_SAMPLE
}
}
$paramTypeNode = $this->staticTypeMapper->mapPHPStanTypeToPhpParserNode($addParamTypeDeclaration->getParamType(), \Rector\PHPStanStaticTypeMapper\Enum\TypeKind::PARAM);
$this->hasChanged = \true;
// remove it
if ($addParamTypeDeclaration->getParamType() instanceof \PHPStan\Type\MixedType) {
if ($this->phpVersionProvider->isAtLeastPhpVersion(\Rector\Core\ValueObject\PhpVersionFeature::MIXED_TYPE)) {

View File

@ -16,11 +16,11 @@ final class VersionResolver
/**
* @var string
*/
public const PACKAGE_VERSION = '0.13.3';
public const PACKAGE_VERSION = 'cd405e6512348d27c2494e9164652b405542e1c8';
/**
* @var string
*/
public const RELEASE_DATE = '2022-05-31 14:18:16';
public const RELEASE_DATE = '2022-05-31 14:37:13';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

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

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0
class ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280
{
private static $loader;
@ -22,19 +22,19 @@ class ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit25345bae361f6ab451fed399c14a4280::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$includeFiles = \Composer\Autoload\ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0::$files;
$includeFiles = \Composer\Autoload\ComposerStaticInit25345bae361f6ab451fed399c14a4280::$files;
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequirec600bdb2fa665c2bcd1acedd558f85e0($fileIdentifier, $file);
composerRequire25345bae361f6ab451fed399c14a4280($fileIdentifier, $file);
}
return $loader;
@ -46,7 +46,7 @@ class ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0
* @param string $file
* @return void
*/
function composerRequirec600bdb2fa665c2bcd1acedd558f85e0($fileIdentifier, $file)
function composerRequire25345bae361f6ab451fed399c14a4280($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 ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0
class ComposerStaticInit25345bae361f6ab451fed399c14a4280
{
public static $files = array (
'23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php',
@ -3762,9 +3762,9 @@ class ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc600bdb2fa665c2bcd1acedd558f85e0::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit25345bae361f6ab451fed399c14a4280::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit25345bae361f6ab451fed399c14a4280::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit25345bae361f6ab451fed399c14a4280::$classMap;
}, null, ClassLoader::class);
}

View File

@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php';
if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) {
spl_autoload_call('RectorPrefix20220531\AutoloadIncluder');
}
if (!class_exists('ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0', false) && !interface_exists('ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0', false) && !trait_exists('ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0', false)) {
spl_autoload_call('RectorPrefix20220531\ComposerAutoloaderInitc600bdb2fa665c2bcd1acedd558f85e0');
if (!class_exists('ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280', false) && !interface_exists('ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280', false) && !trait_exists('ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280', false)) {
spl_autoload_call('RectorPrefix20220531\ComposerAutoloaderInit25345bae361f6ab451fed399c14a4280');
}
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
spl_autoload_call('RectorPrefix20220531\Helmich\TypoScriptParser\Parser\AST\Statement');
@ -56,9 +56,9 @@ if (!function_exists('print_node')) {
return \RectorPrefix20220531\print_node(...func_get_args());
}
}
if (!function_exists('composerRequirec600bdb2fa665c2bcd1acedd558f85e0')) {
function composerRequirec600bdb2fa665c2bcd1acedd558f85e0() {
return \RectorPrefix20220531\composerRequirec600bdb2fa665c2bcd1acedd558f85e0(...func_get_args());
if (!function_exists('composerRequire25345bae361f6ab451fed399c14a4280')) {
function composerRequire25345bae361f6ab451fed399c14a4280() {
return \RectorPrefix20220531\composerRequire25345bae361f6ab451fed399c14a4280(...func_get_args());
}
}
if (!function_exists('scanPath')) {