mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-01 00:40:52 +00:00
Updated Rector to commit 2b811afb584aa7a3c569a2ce23d78edbf126d556
2b811afb58
[Php81] Skip always string if else DomElement on NullToStrictStringFuncCallArgRector (#5822)
This commit is contained in:
parent
2b9acd03a1
commit
284531ceed
|
@ -179,7 +179,7 @@ CODE_SAMPLE
|
||||||
if ($argValue instanceof Encapsed) {
|
if ($argValue instanceof Encapsed) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ($this->isAnErrorTypeFromParentScope($argValue, $scope)) {
|
if ($this->isAnErrorType($argValue, $nativeType, $scope)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if ($this->shouldSkipTrait($argValue, $type, $isTrait)) {
|
if ($this->shouldSkipTrait($argValue, $type, $isTrait)) {
|
||||||
|
@ -217,9 +217,6 @@ CODE_SAMPLE
|
||||||
if (!$isTrait) {
|
if (!$isTrait) {
|
||||||
return \false;
|
return \false;
|
||||||
}
|
}
|
||||||
if ($type instanceof ErrorType) {
|
|
||||||
return \true;
|
|
||||||
}
|
|
||||||
if ($type->isExplicitMixed()) {
|
if ($type->isExplicitMixed()) {
|
||||||
return \false;
|
return \false;
|
||||||
}
|
}
|
||||||
|
@ -228,8 +225,11 @@ CODE_SAMPLE
|
||||||
}
|
}
|
||||||
return \true;
|
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();
|
$parentScope = $scope->getParentScope();
|
||||||
if ($parentScope instanceof Scope) {
|
if ($parentScope instanceof Scope) {
|
||||||
return $parentScope->getType($expr) instanceof ErrorType;
|
return $parentScope->getType($expr) instanceof ErrorType;
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = '86eb512e4f78f909856b90bc18e41704b48ee57a';
|
public const PACKAGE_VERSION = '2b811afb584aa7a3c569a2ce23d78edbf126d556';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2024-04-14 00:29:04';
|
public const RELEASE_DATE = '2024-04-15 19:25:17';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user