mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 05:18:18 +01:00
Updated Rector to commit 090f7246b7b2080b4ed3672d5f9ec83cde4fe1ed
090f7246b7
Fix ArrayItem scope refresh (#6462)
This commit is contained in:
parent
7028045e34
commit
bebd15c3b8
@ -4,7 +4,9 @@ declare (strict_types=1);
|
|||||||
namespace Rector\Application;
|
namespace Rector\Application;
|
||||||
|
|
||||||
use PhpParser\Node;
|
use PhpParser\Node;
|
||||||
|
use PhpParser\Node\ArrayItem;
|
||||||
use PhpParser\Node\Expr;
|
use PhpParser\Node\Expr;
|
||||||
|
use PhpParser\Node\Expr\Array_;
|
||||||
use PhpParser\Node\Expr\CallLike;
|
use PhpParser\Node\Expr\CallLike;
|
||||||
use PhpParser\Node\Expr\Closure;
|
use PhpParser\Node\Expr\Closure;
|
||||||
use PhpParser\Node\Expr\FuncCall;
|
use PhpParser\Node\Expr\FuncCall;
|
||||||
@ -89,6 +91,9 @@ final class ChangedNodeScopeRefresher
|
|||||||
if ($node instanceof Expr) {
|
if ($node instanceof Expr) {
|
||||||
return [new Expression($node)];
|
return [new Expression($node)];
|
||||||
}
|
}
|
||||||
|
if ($node instanceof ArrayItem) {
|
||||||
|
return [new Expression(new Array_([$node]))];
|
||||||
|
}
|
||||||
$errorMessage = \sprintf('Complete parent node of "%s" be a stmt.', \get_class($node));
|
$errorMessage = \sprintf('Complete parent node of "%s" be a stmt.', \get_class($node));
|
||||||
throw new ShouldNotHappenException($errorMessage);
|
throw new ShouldNotHappenException($errorMessage);
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = 'f3750d785fd5128c9b3f124036d5e6532fc63807';
|
public const PACKAGE_VERSION = '090f7246b7b2080b4ed3672d5f9ec83cde4fe1ed';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2024-11-21 10:03:25';
|
public const RELEASE_DATE = '2024-11-21 08:51:53';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user