mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 05:48:21 +01:00
Updated Rector to commit 2846b015388fb1eb6d65941481fe9340908c1f79
2846b01538
[CodeQuality] Skip combine var with property fetch on InlineArrayReturnAssignRector (#5681)
This commit is contained in:
parent
659d1a42fb
commit
c34bb45766
@ -47,7 +47,7 @@ final class VariableDimFetchAssignResolver
|
||||
}
|
||||
$assign = $stmtExpr;
|
||||
$keyExpr = $this->matchKeyOnArrayDimFetchOfVariable($assign, $variable);
|
||||
if ($keyExpr instanceof ArrayDimFetch) {
|
||||
if ($assign->var instanceof ArrayDimFetch && $assign->var->var instanceof ArrayDimFetch) {
|
||||
return [];
|
||||
}
|
||||
$keysAndExprs[] = new KeyAndExpr($keyExpr, $assign->expr, $stmt->getComments());
|
||||
@ -65,7 +65,7 @@ final class VariableDimFetchAssignResolver
|
||||
return null;
|
||||
}
|
||||
$arrayDimFetch = $assign->var;
|
||||
if ($arrayDimFetch->var instanceof Variable && !$this->nodeComparator->areNodesEqual($arrayDimFetch->var, $variable)) {
|
||||
if (!$this->nodeComparator->areNodesEqual($arrayDimFetch->var, $variable)) {
|
||||
return null;
|
||||
}
|
||||
$isFoundInExpr = (bool) $this->betterNodeFinder->findFirst($assign->expr, function (Node $subNode) use($variable) : bool {
|
||||
@ -74,9 +74,6 @@ final class VariableDimFetchAssignResolver
|
||||
if ($isFoundInExpr) {
|
||||
return null;
|
||||
}
|
||||
if ($arrayDimFetch->var instanceof ArrayDimFetch) {
|
||||
return $arrayDimFetch->var;
|
||||
}
|
||||
return $arrayDimFetch->dim;
|
||||
}
|
||||
/**
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'c591bd291650ab22554ffd819e76d01a1a405719';
|
||||
public const PACKAGE_VERSION = '2846b015388fb1eb6d65941481fe9340908c1f79';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-03-03 09:07:19';
|
||||
public const RELEASE_DATE = '2024-03-03 09:17:43';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user