Skip to content

Commit

Permalink
Updated Rector to commit a7cd7eda65894aea11ca012cac8ea4a29fb0a051
Browse files Browse the repository at this point in the history
rectorphp/rector-src@a7cd7ed [EarlyReturn] Handle multiple statements in else in ChangeIfElseValueAssignToEarlyReturnRector (#4580)
  • Loading branch information
TomasVotruba committed Jul 22, 2023
1 parent 1748477 commit 9e3dde0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public function refactor(Node $node) : ?StmtsAwareInterface
$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;
Expand Down
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 = '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
*/
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 ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373::getLoader();
return ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824::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 ComposerAutoloaderInita99de4062acb80aa9520b1a6f5be2373
class ComposerAutoloaderInit6f2dabd27ad2dcf04ce3efd4f1c5e824
{
private static $loader;

Expand All @@ -22,17 +22,17 @@ public static function getLoader()
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;
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 ComposerStaticInita99de4062acb80aa9520b1a6f5be2373
class ComposerStaticInit6f2dabd27ad2dcf04ce3efd4f1c5e824
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 9e3dde0

Please sign in to comment.