Skip to content

Commit

Permalink
Updated Rector to commit cba980b719f48eb580f8afcf4e3843843436ba35
Browse files Browse the repository at this point in the history
rectorphp/rector-src@cba980b [NodeRemoval] Refactor NodeRemover to always use removeNode() method to ensure Node in NodesToRemoveCollector (#3255)
  • Loading branch information
TomasVotruba committed Jan 2, 2023
1 parent fe418cf commit b8f374d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
14 changes: 8 additions & 6 deletions packages/NodeRemoval/NodeRemover.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function removeNodeFromStatements($nodeWithStatements, Node $toBeRemovedN
if ($toBeRemovedNode !== $stmt) {
continue;
}
$this->removeNode($stmt);
unset($nodeWithStatements->stmts[$key]);
break;
}
Expand All @@ -79,8 +80,7 @@ public function removeParam(ClassMethod $classMethod, $keyOrParam) : void
if (!isset($classMethod->params[$key])) {
return;
}
// notify about remove node
$this->rectorChangeCollector->notifyNodeFileInfo($classMethod->params[$key]);
$this->removeNode($classMethod->params[$key]);
unset($classMethod->params[$key]);
}
/**
Expand All @@ -95,8 +95,7 @@ public function removeArg($node, int $key) : void
if (!isset($node->args[$key])) {
return;
}
// notify about remove node
$this->rectorChangeCollector->notifyNodeFileInfo($node->args[$key]);
$this->removeNode($node->args[$key]);
unset($node->args[$key]);
}
/**
Expand All @@ -108,8 +107,11 @@ public function removeStmt($functionLike, int $key) : void
if ($functionLike->stmts === null) {
throw new ShouldNotHappenException();
}
// notify about remove node
$this->rectorChangeCollector->notifyNodeFileInfo($functionLike->stmts[$key]);
// already removed
if (!isset($functionLike->stmts[$key])) {
return;
}
$this->removeNode($functionLike->stmts[$key]);
unset($functionLike->stmts[$key]);
}
}
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 = '79a34f9e0116081e31472c2d6cd415e7d077c21f';
public const PACKAGE_VERSION = 'cba980b719f48eb580f8afcf4e3843843436ba35';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-01-02 12:48:05';
public const RELEASE_DATE = '2023-01-02 12:48:53';
/**
* @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 ComposerAutoloaderInit351d18bb1962d283b8ed3eafada7f951::getLoader();
return ComposerAutoloaderInit698705ff76bcaee632e92c2b89a6b858::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 ComposerAutoloaderInit351d18bb1962d283b8ed3eafada7f951
class ComposerAutoloaderInit698705ff76bcaee632e92c2b89a6b858
{
private static $loader;

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

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

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

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

$filesToLoad = \Composer\Autoload\ComposerStaticInit351d18bb1962d283b8ed3eafada7f951::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit698705ff76bcaee632e92c2b89a6b858::$files;
$requireFile = 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 ComposerStaticInit351d18bb1962d283b8ed3eafada7f951
class ComposerStaticInit698705ff76bcaee632e92c2b89a6b858
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -3062,9 +3062,9 @@ class ComposerStaticInit351d18bb1962d283b8ed3eafada7f951
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit351d18bb1962d283b8ed3eafada7f951::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit351d18bb1962d283b8ed3eafada7f951::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit351d18bb1962d283b8ed3eafada7f951::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit698705ff76bcaee632e92c2b89a6b858::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit698705ff76bcaee632e92c2b89a6b858::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit698705ff76bcaee632e92c2b89a6b858::$classMap;

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

0 comments on commit b8f374d

Please sign in to comment.