Updated Rector to commit c639ef8ad9213881d4fe08554f090934bc5dda07

c639ef8ad9 RemoveUnusedNonEmptyArrayBeforeForeachRector: ignore phpdoc types (#5169)
This commit is contained in:
Tomas Votruba 2023-10-14 12:51:53 +00:00
parent 727c62f465
commit 4c4ad160dd
2 changed files with 7 additions and 3 deletions

View File

@ -120,13 +120,17 @@ CODE_SAMPLE
if (\is_string($variableName) && $this->reservedKeywordAnalyzer->isNativeVariable($variableName)) {
return \false;
}
$ifType = $scope->getNativeType($foreachExpr);
if (!$ifType->isArray()->yes()) {
return \false;
}
}
$ifCond = $if->cond;
if ($ifCond instanceof BooleanAnd) {
return $this->isUselessBooleanAnd($ifCond, $foreachExpr);
}
if (($ifCond instanceof Variable || $this->propertyFetchAnalyzer->isPropertyFetch($ifCond)) && $this->nodeComparator->areNodesEqual($ifCond, $foreachExpr)) {
$ifType = $scope->getType($ifCond);
$ifType = $scope->getNativeType($ifCond);
return $ifType->isArray()->yes();
}
if ($this->uselessIfCondBeforeForeachDetector->isMatchingNotIdenticalEmptyArray($if, $foreachExpr)) {

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = 'd55a35bcdede830d3927de1c11e0f7f0d12ee9e4';
public const PACKAGE_VERSION = 'c639ef8ad9213881d4fe08554f090934bc5dda07';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-10-13 22:53:35';
public const RELEASE_DATE = '2023-10-14 19:48:51';
/**
* @var int
*/