mirror of https://github.com/rectorphp/rector.git
Updated Rector to commit 4d56a61025597b598a1287f76f475bb6e8f1766f
4d56a61025
[DeadCode] Remove UnionType check on RecastingRemovalRector (#5142)
This commit is contained in:
parent
8b7e66c3f3
commit
1eb3a7a3a9
|
@ -14,7 +14,6 @@ use PhpParser\Node\Expr\Cast\Object_;
|
|||
use PhpParser\Node\Expr\Cast\String_;
|
||||
use PhpParser\Node\Expr\MethodCall;
|
||||
use PhpParser\Node\Expr\StaticCall;
|
||||
use PhpParser\Node\Expr\StaticPropertyFetch;
|
||||
use PHPStan\Reflection\Php\PhpPropertyReflection;
|
||||
use PHPStan\Type\ArrayType;
|
||||
use PHPStan\Type\BooleanType;
|
||||
|
@ -126,11 +125,7 @@ CODE_SAMPLE
|
|||
}
|
||||
$phpPropertyReflection = $this->reflectionResolver->resolvePropertyReflectionFromPropertyFetch($expr);
|
||||
if (!$phpPropertyReflection instanceof PhpPropertyReflection) {
|
||||
$propertyType = $expr instanceof StaticPropertyFetch ? $this->nodeTypeResolver->getType($expr->class) : $this->nodeTypeResolver->getType($expr->var);
|
||||
// need to UnionType check due rectify with RecastingRemovalRector + CountOnNullRector
|
||||
// cause add (array) cast on $node->args
|
||||
// on union $node types FuncCall|MethodCall|StaticCall
|
||||
return !$propertyType instanceof UnionType;
|
||||
return \true;
|
||||
}
|
||||
$nativeType = $phpPropertyReflection->getNativeType();
|
||||
return $nativeType instanceof MixedType;
|
||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
|||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'e83c7ef0b689c36d548ae0328b4a4bcf6fcde6b8';
|
||||
public const PACKAGE_VERSION = '4d56a61025597b598a1287f76f475bb6e8f1766f';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2023-10-08 08:57:03';
|
||||
public const RELEASE_DATE = '2023-10-08 10:14:26';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue