mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit 0f100f0ec5c9f54afa8eafda0e7f2ce78c738529
0f100f0ec5
Drop AttributeKey::SCOPE in PrivatizeFinalClassMethodRector (#4140)
This commit is contained in:
parent
17487f2df7
commit
bc14b9b983
@ -9,6 +9,7 @@ use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\Core\Rector\AbstractScopeAwareRector;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Privatization\NodeManipulator\VisibilityManipulator;
|
||||
use Rector\Privatization\VisibilityGuard\ClassMethodVisibilityGuard;
|
||||
@ -17,7 +18,7 @@ use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
/**
|
||||
* @see \Rector\Tests\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector\PrivatizeFinalClassMethodRectorTest
|
||||
*/
|
||||
final class PrivatizeFinalClassMethodRector extends AbstractRector
|
||||
final class PrivatizeFinalClassMethodRector extends AbstractScopeAwareRector
|
||||
{
|
||||
/**
|
||||
* @readonly
|
||||
@ -64,16 +65,12 @@ CODE_SAMPLE
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(Node $node) : ?Node
|
||||
public function refactorWithScope(Node $node, Scope $scope) : ?Node
|
||||
{
|
||||
if (!$node->isFinal()) {
|
||||
return null;
|
||||
}
|
||||
$classScope = $node->getAttribute(AttributeKey::SCOPE);
|
||||
if (!$classScope instanceof Scope) {
|
||||
return null;
|
||||
}
|
||||
$classReflection = $classScope->getClassReflection();
|
||||
$classReflection = $scope->getClassReflection();
|
||||
if (!$classReflection instanceof ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '22f121a671b2c779e8e3ec6471c14d4a3321631d';
|
||||
public const PACKAGE_VERSION = '0f100f0ec5c9f54afa8eafda0e7f2ce78c738529';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-09 16:59:55';
|
||||
public const RELEASE_DATE = '2023-06-09 19:02:12';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
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 ComposerAutoloaderInita684d2c132f2c1a3670e36ee6392171c::getLoader();
|
||||
return ComposerAutoloaderInit8ba21c9c8daacad4fc503ef6418f1570::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 ComposerAutoloaderInita684d2c132f2c1a3670e36ee6392171c
|
||||
class ComposerAutoloaderInit8ba21c9c8daacad4fc503ef6418f1570
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInita684d2c132f2c1a3670e36ee6392171c
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInita684d2c132f2c1a3670e36ee6392171c', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit8ba21c9c8daacad4fc503ef6418f1570', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita684d2c132f2c1a3670e36ee6392171c', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit8ba21c9c8daacad4fc503ef6418f1570', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita684d2c132f2c1a3670e36ee6392171c::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInita684d2c132f2c1a3670e36ee6392171c::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570::$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 ComposerStaticInita684d2c132f2c1a3670e36ee6392171c
|
||||
class ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3128,9 +3128,9 @@ class ComposerStaticInita684d2c132f2c1a3670e36ee6392171c
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita684d2c132f2c1a3670e36ee6392171c::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita684d2c132f2c1a3670e36ee6392171c::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita684d2c132f2c1a3670e36ee6392171c::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit8ba21c9c8daacad4fc503ef6418f1570::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user