mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit fea5d6c0034746e050851887a7900bf94a22069d
fea5d6c003
[TypeDeclaration] Skip casted to (array) on StrictArrayParamDimFetchRector (#5356)
This commit is contained in:
parent
39e43b6cca
commit
e3e6cff9bd
|
@ -8,6 +8,7 @@ use PhpParser\Node\Expr;
|
|||
use PhpParser\Node\Expr\ArrayDimFetch;
|
||||
use PhpParser\Node\Expr\AssignOp\Coalesce as AssignOpCoalesce;
|
||||
use PhpParser\Node\Expr\BinaryOp\Coalesce;
|
||||
use PhpParser\Node\Expr\Cast\Array_;
|
||||
use PhpParser\Node\Expr\Closure;
|
||||
use PhpParser\Node\Expr\FuncCall;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
|
@ -167,7 +168,14 @@ CODE_SAMPLE
|
|||
if ($nodeToCheck instanceof Variable && $this->isName($nodeToCheck, $paramName)) {
|
||||
return \true;
|
||||
}
|
||||
return $this->isEchoed($node, $paramName);
|
||||
return $this->isEchoedOrCasted($node, $paramName);
|
||||
}
|
||||
private function isEchoedOrCasted(Node $node, string $paramName) : bool
|
||||
{
|
||||
if ($this->isEchoed($node, $paramName)) {
|
||||
return \true;
|
||||
}
|
||||
return $node instanceof Array_ && $node->expr instanceof Variable && $node->expr->name === $paramName;
|
||||
}
|
||||
private function isMethodCallOrArrayDimFetch(string $paramName, ?Node $node) : bool
|
||||
{
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'dc9573d9bd60ec966db626be91c13cc6a5c4bbef';
|
||||
public const PACKAGE_VERSION = 'fea5d6c0034746e050851887a7900bf94a22069d';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-12-11 14:04:32';
|
||||
public const RELEASE_DATE = '2023-12-12 22:44:49';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue