Updated Rector to commit 16f8d19db32108740794a68a011c78328bb69aed

16f8d19db3 Fix StrictArrayParamDimFetchRector for string access (#5383)
This commit is contained in:
Tomas Votruba 2023-12-23 20:44:18 +00:00
parent 80dad1d8c8
commit f77e8b8450
2 changed files with 10 additions and 2 deletions

View File

@ -118,6 +118,9 @@ CODE_SAMPLE
if (!$node instanceof ArrayDimFetch) {
return null;
}
if (!$node->dim instanceof Expr) {
return null;
}
if (!$node->var instanceof Variable) {
return null;
}
@ -129,6 +132,11 @@ CODE_SAMPLE
if ($variableType->isString()->yes()) {
return null;
}
// skip integer in possibly string type as string can be accessed via int
$dimType = $this->getType($node->dim);
if ($dimType->isInteger()->yes() && $variableType->isString()->maybe()) {
return null;
}
$isParamAccessedArrayDimFetch = \true;
return null;
});

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'a644d0d4a2f1e457f77cf8e384fd32b78b5ff388';
public const PACKAGE_VERSION = '16f8d19db32108740794a68a011c78328bb69aed';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-23 20:42:09';
public const RELEASE_DATE = '2023-12-23 20:41:53';
/**
* @var int
*/