mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
Updated Rector to commit dec1dddede5713915f90b41f932ebbaaf0996a5a
dec1dddede
[Privatization] Do not remove comment on ChangeReadOnlyPropertyWithDefaultValueToConstantRector (#3204)
This commit is contained in:
parent
6f77572e6a
commit
6544cfc63c
@ -8,7 +8,6 @@ use PhpParser\Node\Expr;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassConst;
|
||||
use PhpParser\Node\Stmt\Property;
|
||||
use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Rector\Privatization\Naming\ConstantNaming;
|
||||
final class ClassConstantFactory
|
||||
@ -18,15 +17,9 @@ final class ClassConstantFactory
|
||||
* @var \Rector\Privatization\Naming\ConstantNaming
|
||||
*/
|
||||
private $constantNaming;
|
||||
/**
|
||||
* @readonly
|
||||
* @var \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory
|
||||
*/
|
||||
private $phpDocInfoFactory;
|
||||
public function __construct(ConstantNaming $constantNaming, PhpDocInfoFactory $phpDocInfoFactory)
|
||||
public function __construct(ConstantNaming $constantNaming)
|
||||
{
|
||||
$this->constantNaming = $constantNaming;
|
||||
$this->phpDocInfoFactory = $phpDocInfoFactory;
|
||||
}
|
||||
public function createFromProperty(Property $property) : ClassConst
|
||||
{
|
||||
@ -38,9 +31,8 @@ final class ClassConstantFactory
|
||||
$classConst = new ClassConst([$const]);
|
||||
$classConst->flags = $property->flags & ~Class_::MODIFIER_STATIC;
|
||||
$const->setAttribute(AttributeKey::PARENT_NODE, $classConst);
|
||||
$phpDocInfo = $this->phpDocInfoFactory->createFromNodeOrEmpty($property);
|
||||
$phpDocInfo->markAsChanged();
|
||||
$classConst->setAttribute(AttributeKey::PHP_DOC_INFO, $phpDocInfo);
|
||||
$classConst->setAttribute(AttributeKey::PHP_DOC_INFO, $property->getAttribute(AttributeKey::PHP_DOC_INFO));
|
||||
$classConst->setAttribute(AttributeKey::COMMENTS, $property->getAttribute(AttributeKey::COMMENTS));
|
||||
$classConst->setAttribute(AttributeKey::PARENT_NODE, $property->getAttribute(AttributeKey::PARENT_NODE));
|
||||
return $classConst;
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '79a4c3a8c020f5a254a81838998040b62c76f17b';
|
||||
public const PACKAGE_VERSION = 'dec1dddede5713915f90b41f932ebbaaf0996a5a';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-12-15 15:28:29';
|
||||
public const RELEASE_DATE = '2022-12-16 07:37:34';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868::getLoader();
|
||||
return ComposerAutoloaderInita609f0351dbc9c0491f288eca9229125::getLoader();
|
||||
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868
|
||||
class ComposerAutoloaderInita609f0351dbc9c0491f288eca9229125
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,19 +22,19 @@ class ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInita609f0351dbc9c0491f288eca9229125', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita609f0351dbc9c0491f288eca9229125', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita609f0351dbc9c0491f288eca9229125::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868::$files;
|
||||
$includeFiles = \Composer\Autoload\ComposerStaticInita609f0351dbc9c0491f288eca9229125::$files;
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequired1d5f18aecea2fcba03ec3491ce87868($fileIdentifier, $file);
|
||||
composerRequirea609f0351dbc9c0491f288eca9229125($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
@ -46,7 +46,7 @@ class ComposerAutoloaderInitd1d5f18aecea2fcba03ec3491ce87868
|
||||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequired1d5f18aecea2fcba03ec3491ce87868($fileIdentifier, $file)
|
||||
function composerRequirea609f0351dbc9c0491f288eca9229125($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 ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868
|
||||
class ComposerStaticInita609f0351dbc9c0491f288eca9229125
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3030,9 +3030,9 @@ class ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInitd1d5f18aecea2fcba03ec3491ce87868::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita609f0351dbc9c0491f288eca9229125::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita609f0351dbc9c0491f288eca9229125::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita609f0351dbc9c0491f288eca9229125::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user