Updated Rector to commit 88d0f8c4ca8522e21489eb61952dfbe8aaa3f2ee

88d0f8c4ca [NodeFinder] Remove parent lookup on PropertyFetchFinder (#4174)
This commit is contained in:
Tomas Votruba 2023-06-11 06:51:34 +00:00
parent cb5ccf435f
commit f332c82cdd
5 changed files with 16 additions and 15 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '72ac71bf586bb2aa23d723ae7c3df0f237fa553d';
public const PACKAGE_VERSION = '88d0f8c4ca8522e21489eb61952dfbe8aaa3f2ee';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-06-11 13:34:31';
public const RELEASE_DATE = '2023-06-11 13:47:30';
/**
* @var int
*/

View File

@ -13,6 +13,7 @@ use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Class_;
use PhpParser\Node\Stmt\Property;
use PhpParser\Node\Stmt\Trait_;
use PHPStan\Reflection\ClassReflection;
use PHPStan\Type\TypeWithClassName;
use Rector\Core\NodeAnalyzer\PropertyFetchAnalyzer;
use Rector\Core\PhpParser\AstResolver;
@ -156,11 +157,11 @@ final class PropertyFetchFinder
*/
private function isInAnonymous(PropertyFetch $propertyFetch, $class, bool $hasTrait) : bool
{
$parentNode = $this->betterNodeFinder->findParentType($propertyFetch, Class_::class);
if (!$parentNode instanceof Class_) {
$classReflection = $this->reflectionResolver->resolveClassReflection($propertyFetch);
if (!$classReflection instanceof ClassReflection || !$classReflection->isClass()) {
return \false;
}
return $parentNode !== $class && !$hasTrait;
return $classReflection->getName() !== $this->nodeNameResolver->getName($class) && !$hasTrait;
}
/**
* @param \PhpParser\Node\Stmt\Class_|\PhpParser\Node\Stmt\Trait_ $class

2
vendor/autoload.php vendored
View File

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

View File

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