mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
Updated Rector to commit a7cd7eda65894aea11ca012cac8ea4a29fb0a051
a7cd7eda65
[EarlyReturn] Handle multiple statements in else in ChangeIfElseValueAssignToEarlyReturnRector (#4580)
This commit is contained in:
parent
174847774d
commit
9e3dde0cb2
@ -4,7 +4,6 @@ declare (strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\PhpDocParser;
|
||||
|
||||
use PhpParser\Node as PhpNode;
|
||||
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstExprNode;
|
||||
use PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode;
|
||||
use PHPStan\PhpDocParser\Ast\Node;
|
||||
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
|
||||
|
@ -115,6 +115,9 @@ CODE_SAMPLE
|
||||
$this->mirrorComments($stmt, $assign);
|
||||
$if->else = null;
|
||||
$stmt->expr = $assign->expr;
|
||||
$lastStmt = \array_pop($node->stmts);
|
||||
$elseStmtsExceptLast = \array_slice($elseStmts, 0, -1);
|
||||
$node->stmts = \array_merge($node->stmts, $elseStmtsExceptLast, [$lastStmt]);
|
||||
return $node;
|
||||
}
|
||||
return null;
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c94645b3ab7debe9c00531597c1b896080a2cf9d';
|
||||
public const PACKAGE_VERSION = 'a7cd7eda65894aea11ca012cac8ea4a29fb0a051';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-07-22 17:51:58';
|
||||
public const RELEASE_DATE = '2023-07-22 14:06:03';
|
||||
/**
|
||||
* @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 ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373::getLoader();
|
||||
return ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824::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 ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373
|
||||
class ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
@ -22,17 +22,17 @@ class ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373
|
||||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824', 'loadClassLoader'));
|
||||
|
||||
require __DIR__ . '/autoload_static.php';
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInita99de4062acb80aa9520b1a6f5be2373::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824::getInitializer($loader));
|
||||
|
||||
$loader->setClassMapAuthoritative(true);
|
||||
$loader->register(true);
|
||||
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInita99de4062acb80aa9520b1a6f5be2373::$files;
|
||||
$filesToLoad = \Composer\Autoload\ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824::$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 ComposerStaticInita99de4062acb80aa9520b1a6f5be2373
|
||||
class ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824
|
||||
{
|
||||
public static $files = array (
|
||||
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
|
||||
@ -3020,9 +3020,9 @@ class ComposerStaticInita99de4062acb80aa9520b1a6f5be2373
|
||||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInita99de4062acb80aa9520b1a6f5be2373::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInita99de4062acb80aa9520b1a6f5be2373::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInita99de4062acb80aa9520b1a6f5be2373::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user