mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 6cc42eb33187a9b77357c1f459d724c8aa1eb4f7
6cc42eb331
[StaticTypeMapper] Remove parent attribute usage on FullyQualifiedObjectType (#4347)
This commit is contained in:
parent
f7561073a3
commit
ebab7418f4
@ -9,6 +9,7 @@ use PhpParser\Node\Stmt\UseUse;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\TypeWithClassName;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
/**
|
||||
* @api
|
||||
*/
|
||||
@ -31,6 +32,7 @@ final class AliasedObjectType extends ObjectType
|
||||
public function getUseNode() : Use_
|
||||
{
|
||||
$name = new Name($this->fullyQualifiedClass);
|
||||
$name->setAttribute(AttributeKey::IS_USEUSE_NAME, \true);
|
||||
$useUse = new UseUse($name, $this->getClassName());
|
||||
return new Use_([$useUse]);
|
||||
}
|
||||
@ -48,6 +50,7 @@ final class AliasedObjectType extends ObjectType
|
||||
public function getFunctionUseNode() : Use_
|
||||
{
|
||||
$name = new Name($this->fullyQualifiedClass);
|
||||
$name->setAttribute(AttributeKey::IS_USEUSE_NAME, \true);
|
||||
$useUse = new UseUse($name, $this->getClassName());
|
||||
$use = new Use_([$useUse]);
|
||||
$use->type = Use_::TYPE_FUNCTION;
|
||||
|
@ -45,15 +45,15 @@ final class FullyQualifiedObjectType extends ObjectType
|
||||
public function getUseNode() : Use_
|
||||
{
|
||||
$name = new Name($this->getClassName());
|
||||
$name->setAttribute(AttributeKey::IS_USEUSE_NAME, \true);
|
||||
$useUse = new UseUse($name);
|
||||
$name->setAttribute(AttributeKey::PARENT_NODE, $useUse);
|
||||
return new Use_([$useUse]);
|
||||
}
|
||||
public function getFunctionUseNode() : Use_
|
||||
{
|
||||
$name = new Name($this->getClassName());
|
||||
$name->setAttribute(AttributeKey::IS_USEUSE_NAME, \true);
|
||||
$useUse = new UseUse($name, null);
|
||||
$name->setAttribute(AttributeKey::PARENT_NODE, $useUse);
|
||||
$use = new Use_([$useUse]);
|
||||
$use->type = Use_::TYPE_FUNCTION;
|
||||
return $use;
|
||||
|
@ -4,7 +4,6 @@ declare (strict_types=1);
|
||||
namespace Rector\CodingStyle\Node;
|
||||
|
||||
use PhpParser\Node\Name;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt\GroupUse;
|
||||
use PhpParser\Node\Stmt\Use_;
|
||||
use Rector\CodingStyle\ClassNameImport\AliasUsesResolver;
|
||||
@ -133,10 +132,7 @@ final class NameImporter
|
||||
if ($name->getAttribute(AttributeKey::IS_NAMESPACE_NAME) === \true) {
|
||||
return \true;
|
||||
}
|
||||
if ($name->getAttribute(AttributeKey::IS_USEUSE_NAME) === \true) {
|
||||
return \true;
|
||||
}
|
||||
return !$name instanceof FullyQualified;
|
||||
return $name->getAttribute(AttributeKey::IS_USEUSE_NAME) === \true;
|
||||
}
|
||||
private function isFunctionOrConstantImportWithSingleName(Name $name) : bool
|
||||
{
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'beca17df3f02d9a2a7800e9b238bac3b9c862498';
|
||||
public const PACKAGE_VERSION = '6cc42eb33187a9b77357c1f459d724c8aa1eb4f7';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-06-25 23:48:32';
|
||||
public const RELEASE_DATE = '2023-06-26 00:02:05';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInit6c9499dd0d9c07b7ba7975b1e0a97662::getLoader();
|
||||
return ComposerAutoloaderInit63c0cd1f8e04b29f96bbff647001340d::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 ComposerAutoloaderInit6c9499dd0d9c07b7ba7975b1e0a97662
|
||||
class ComposerAutoloaderInit63c0cd1f8e04b29f96bbff647001340d
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInit6c9499dd0d9c07b7ba7975b1e0a97662
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6c9499dd0d9c07b7ba7975b1e0a97662', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit63c0cd1f8e04b29f96bbff647001340d', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6c9499dd0d9c07b7ba7975b1e0a97662', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit63c0cd1f8e04b29f96bbff647001340d', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d::$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 ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662
|
||||
class ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3091,9 +3091,9 @@ class ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6c9499dd0d9c07b7ba7975b1e0a97662::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit63c0cd1f8e04b29f96bbff647001340d::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user