Updated Rector to commit 99bdd27c00f0a27620f75eeeedc36bb3d505456b

99bdd27c00 [CodeQuality] Remove next attribute usage on SimplifyIfNullableReturnRector (#3866)
This commit is contained in:
Tomas Votruba 2023-05-16 05:46:08 +00:00
parent 1c829c24c3
commit 0b0fda9095
5 changed files with 16 additions and 17 deletions

View File

@ -9,6 +9,7 @@ use PhpParser\Node\Expr\Assign;
use PhpParser\Node\Expr\BooleanNot;
use PhpParser\Node\Expr\Instanceof_;
use PhpParser\Node\Name;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\If_;
use PhpParser\Node\Stmt\Return_;
@ -21,7 +22,6 @@ use Rector\Core\Contract\PhpParser\Node\StmtsAwareInterface;
use Rector\Core\NodeManipulator\IfManipulator;
use Rector\Core\Rector\AbstractRector;
use Rector\DeadCode\PhpDoc\TagRemover\VarTagRemover;
use Rector\NodeTypeResolver\Node\AttributeKey;
use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
@ -103,7 +103,7 @@ CODE_SAMPLE
continue;
}
$if = $previousStmt;
if ($this->shouldSkip($if)) {
if ($this->shouldSkip($if, $stmt)) {
continue;
}
/** @var BooleanNot|Instanceof_ $cond */
@ -219,13 +219,12 @@ CODE_SAMPLE
$this->mirrorComments($exprReturn, $expression);
return $exprReturn;
}
private function shouldSkip(If_ $if) : bool
private function shouldSkip(If_ $if, Stmt $stmt) : bool
{
if (!$this->ifManipulator->isIfWithOnly($if, Return_::class)) {
return \true;
}
$nextNode = $if->getAttribute(AttributeKey::NEXT_NODE);
if (!$nextNode instanceof Return_) {
if (!$stmt instanceof Return_) {
return \true;
}
$cond = $if->cond;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '5d78e95c82dc59cd66919b703193d0978d01b902';
public const PACKAGE_VERSION = '99bdd27c00f0a27620f75eeeedc36bb3d505456b';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-05-16 04:24:06';
public const RELEASE_DATE = '2023-05-16 05:41:22';
/**
* @var int
*/

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1f5c74b05d824a507621d5865fa8e21e::getLoader();
return ComposerAutoloaderInitea6a6b12d203fca1e7d4c15dde25a2a1::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit1f5c74b05d824a507621d5865fa8e21e
class ComposerAutoloaderInitea6a6b12d203fca1e7d4c15dde25a2a1
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit1f5c74b05d824a507621d5865fa8e21e
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit1f5c74b05d824a507621d5865fa8e21e', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitea6a6b12d203fca1e7d4c15dde25a2a1', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit1f5c74b05d824a507621d5865fa8e21e', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitea6a6b12d203fca1e7d4c15dde25a2a1', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e
class ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -3103,9 +3103,9 @@ class ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1f5c74b05d824a507621d5865fa8e21e::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitea6a6b12d203fca1e7d4c15dde25a2a1::$classMap;
}, null, ClassLoader::class);
}