Updated Rector to commit 2b811afb584aa7a3c569a2ce23d78edbf126d556

2b811afb58 [Php81] Skip always string if else DomElement on NullToStrictStringFuncCallArgRector (#5822)
This commit is contained in:
Tomas Votruba 2024-04-15 12:27:37 +00:00
parent 2b9acd03a1
commit 284531ceed
2 changed files with 7 additions and 7 deletions

View File

@ -179,7 +179,7 @@ CODE_SAMPLE
if ($argValue instanceof Encapsed) {
return null;
}
if ($this->isAnErrorTypeFromParentScope($argValue, $scope)) {
if ($this->isAnErrorType($argValue, $nativeType, $scope)) {
return null;
}
if ($this->shouldSkipTrait($argValue, $type, $isTrait)) {
@ -217,9 +217,6 @@ CODE_SAMPLE
if (!$isTrait) {
return \false;
}
if ($type instanceof ErrorType) {
return \true;
}
if ($type->isExplicitMixed()) {
return \false;
}
@ -228,8 +225,11 @@ CODE_SAMPLE
}
return \true;
}
private function isAnErrorTypeFromParentScope(Expr $expr, Scope $scope) : bool
private function isAnErrorType(Expr $expr, Type $type, Scope $scope) : bool
{
if ($type instanceof ErrorType) {
return \true;
}
$parentScope = $scope->getParentScope();
if ($parentScope instanceof Scope) {
return $parentScope->getType($expr) instanceof ErrorType;

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '86eb512e4f78f909856b90bc18e41704b48ee57a';
public const PACKAGE_VERSION = '2b811afb584aa7a3c569a2ce23d78edbf126d556';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2024-04-14 00:29:04';
public const RELEASE_DATE = '2024-04-15 19:25:17';
/**
* @var int
*/