mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-16 21:08:19 +01:00
Updated Rector to commit 05e8819c7106c4f98a6373c8b2da4e283242d98b
05e8819c71
[CodeQuality] Handle crash on echo with first class callable on OptionalParametersAfterRequiredRector (#6553)
This commit is contained in:
parent
287778d519
commit
6d5b413193
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '22275db093192e212662b222e2ce804def71b6ed';
|
||||
public const PACKAGE_VERSION = '05e8819c7106c4f98a6373c8b2da4e283242d98b';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-12-11 20:48:02';
|
||||
public const RELEASE_DATE = '2024-12-11 23:12:43';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -61,6 +61,7 @@ use PhpParser\Node\Stmt\Class_;
|
||||
use PhpParser\Node\Stmt\ClassConst;
|
||||
use PhpParser\Node\Stmt\ClassLike;
|
||||
use PhpParser\Node\Stmt\ClassMethod;
|
||||
use PhpParser\Node\Stmt\Echo_;
|
||||
use PhpParser\Node\Stmt\Enum_;
|
||||
use PhpParser\Node\Stmt\EnumCase;
|
||||
use PhpParser\Node\Stmt\Expression;
|
||||
@ -312,6 +313,10 @@ final class PHPStanNodeScopeResolver
|
||||
$this->processIssetOrUnset($node, $mutatingScope);
|
||||
return;
|
||||
}
|
||||
if ($node instanceof Echo_) {
|
||||
$this->processEcho($node, $mutatingScope);
|
||||
return;
|
||||
}
|
||||
};
|
||||
$this->nodeScopeResolverProcessNodes($stmts, $scope, $nodeCallback);
|
||||
$nodeTraverser = new NodeTraverser();
|
||||
@ -340,6 +345,12 @@ final class PHPStanNodeScopeResolver
|
||||
$var->setAttribute(AttributeKey::SCOPE, $mutatingScope);
|
||||
}
|
||||
}
|
||||
private function processEcho(Echo_ $echo, MutatingScope $mutatingScope) : void
|
||||
{
|
||||
foreach ($echo->exprs as $expr) {
|
||||
$expr->setAttribute(AttributeKey::SCOPE, $mutatingScope);
|
||||
}
|
||||
}
|
||||
private function processMatch(Match_ $match, MutatingScope $mutatingScope) : void
|
||||
{
|
||||
$match->cond->setAttribute(AttributeKey::SCOPE, $mutatingScope);
|
||||
|
Loading…
x
Reference in New Issue
Block a user