Updated Rector to commit 4f6de3f84ecb50aba2643f4b38dcfce6e04e1f4a

4f6de3f84e ReadOnlyPropertyRector: do cheaper checks first (#3618)
This commit is contained in:
Tomas Votruba 2023-04-16 10:42:58 +00:00
parent 6e25b4629b
commit 4febb1e4a1
5 changed files with 16 additions and 16 deletions

View File

@ -127,9 +127,6 @@ CODE_SAMPLE
private function refactorProperty(Property $property) : ?Property
{
// 1. is property read-only?
if ($this->propertyManipulator->isPropertyChangeableExceptConstructor($property)) {
return null;
}
if ($property->isReadonly()) {
return null;
}
@ -139,10 +136,13 @@ CODE_SAMPLE
if ($property->type === null) {
return null;
}
if ($property->isStatic()) {
return null;
}
if (!$this->visibilityManipulator->hasVisibility($property, Visibility::PRIVATE)) {
return null;
}
if ($property->isStatic()) {
if ($this->propertyManipulator->isPropertyChangeableExceptConstructor($property)) {
return null;
}
if ($this->propertyFetchAssignManipulator->isAssignedMultipleTimesInConstructor($property)) {

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'eb34dee89488a8869ae5b726b03c16fe2979f7f5';
public const PACKAGE_VERSION = '4f6de3f84ecb50aba2643f4b38dcfce6e04e1f4a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-04-16 00:27:47';
public const RELEASE_DATE = '2023-04-16 17:38:58';
/**
* @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 ComposerAutoloaderInitdaf29892b782f8235b3a5b861bef9ed1::getLoader();
return ComposerAutoloaderInitae71c35e22ac7e8ee8890094509ff7a5::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitdaf29892b782f8235b3a5b861bef9ed1
class ComposerAutoloaderInitae71c35e22ac7e8ee8890094509ff7a5
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInitdaf29892b782f8235b3a5b861bef9ed1
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitdaf29892b782f8235b3a5b861bef9ed1', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitae71c35e22ac7e8ee8890094509ff7a5', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitdaf29892b782f8235b3a5b861bef9ed1', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitae71c35e22ac7e8ee8890094509ff7a5', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5::$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 ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1
class ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3139,9 +3139,9 @@ class ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitdaf29892b782f8235b3a5b861bef9ed1::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitae71c35e22ac7e8ee8890094509ff7a5::$classMap;
}, null, ClassLoader::class);
}