mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
Updated Rector to commit 88d0f8c4ca8522e21489eb61952dfbe8aaa3f2ee
88d0f8c4ca
[NodeFinder] Remove parent lookup on PropertyFetchFinder (#4174)
This commit is contained in:
parent
cb5ccf435f
commit
f332c82cdd
@ -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
|
||||
*/
|
||||
|
@ -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
2
vendor/autoload.php
vendored
@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
|
||||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit32c2415590ca90ce4116722e1edb1ef0::getLoader();
|
||||
return ComposerAutoloaderInitea300b768e2c0a3e4712a25f62d39811::getLoader();
|
||||
|
10
vendor/composer/autoload_real.php
vendored
10
vendor/composer/autoload_real.php
vendored
@ -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;
|
||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user