Skip to content

Commit

Permalink
Updated Rector to commit d6db5480e18c7d231cce9265972fa65c6e786d4a
Browse files Browse the repository at this point in the history
rectorphp/rector-src@d6db548 [NodeTypeResolver] Remove parent attribute on VariableTypeResolver (#4334)
  • Loading branch information
TomasVotruba committed Jun 24, 2023
1 parent 0500a60 commit da8d75e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function resolve(Node $node) : Type
}
private function resolveTypesFromScope(Variable $variable, string $variableName) : Type
{
$scope = $this->resolveNodeScope($variable);
$scope = $variable->getAttribute(AttributeKey::SCOPE);
if (!$scope instanceof Scope) {
return new MixedType();
}
Expand All @@ -70,20 +70,4 @@ private function resolveTypesFromScope(Variable $variable, string $variableName)
// this → object type is easier to work with and consistent with the rest of the code
return $scope->getVariableType($variableName);
}
private function resolveNodeScope(Variable $variable) : ?Scope
{
$scope = $variable->getAttribute(AttributeKey::SCOPE);
if ($scope instanceof Scope) {
return $scope;
}
return $this->resolveFromParentNodes($variable);
}
private function resolveFromParentNodes(Variable $variable) : ?Scope
{
$parentNode = $variable->getAttribute(AttributeKey::PARENT_NODE);
if (!$parentNode instanceof Node) {
return null;
}
return $parentNode->getAttribute(AttributeKey::SCOPE);
}
}
4 changes: 2 additions & 2 deletions src/Application/VersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '8f5b1fe482e8c7ec2b9774af4b08e68317d3e0c8';
public const PACKAGE_VERSION = 'd6db5480e18c7d231cce9265972fa65c6e786d4a';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-06-24 07:58:33';
public const RELEASE_DATE = '2023-06-24 08:35:23';
/**
* @var int
*/
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitee5277868b30c9187959a966705c6830::getLoader();
return ComposerAutoloaderInitae33b639b7a2eb2f7a444e525a507f42::getLoader();
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitee5277868b30c9187959a966705c6830
class ComposerAutoloaderInitae33b639b7a2eb2f7a444e525a507f42
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInitee5277868b30c9187959a966705c6830', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitae33b639b7a2eb2f7a444e525a507f42', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitee5277868b30c9187959a966705c6830', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitae33b639b7a2eb2f7a444e525a507f42', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitee5277868b30c9187959a966705c6830::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitee5277868b30c9187959a966705c6830::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitee5277868b30c9187959a966705c6830
class ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3094,9 +3094,9 @@ class ComposerStaticInitee5277868b30c9187959a966705c6830
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitee5277868b30c9187959a966705c6830::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitee5277868b30c9187959a966705c6830::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitee5277868b30c9187959a966705c6830::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitae33b639b7a2eb2f7a444e525a507f42::$classMap;

}, null, ClassLoader::class);
}
Expand Down

0 comments on commit da8d75e

Please sign in to comment.