mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-13 20:12:07 +01:00
Updated Rector to commit 95a145f9311826749ea9e72f44c3a3adb2a030f3
95a145f931
[DeadCode] Skip union falsy mixed on trait on RecastingRemovalRector (#6718)
This commit is contained in:
parent
e3da0f3d06
commit
7af22161c0
@ -24,6 +24,7 @@ use PHPStan\Type\MixedType;
|
||||
use PHPStan\Type\ObjectType;
|
||||
use PHPStan\Type\StringType;
|
||||
use PHPStan\Type\Type;
|
||||
use PHPStan\Type\UnionType;
|
||||
use Rector\NodeAnalyzer\ExprAnalyzer;
|
||||
use Rector\NodeAnalyzer\PropertyFetchAnalyzer;
|
||||
use Rector\Rector\AbstractRector;
|
||||
@ -126,6 +127,14 @@ CODE_SAMPLE
|
||||
}
|
||||
private function shouldSkip(Expr $expr) : bool
|
||||
{
|
||||
$type = $this->getType($expr);
|
||||
if ($type instanceof UnionType) {
|
||||
foreach ($type->getTypes() as $unionedType) {
|
||||
if ($unionedType instanceof MixedType) {
|
||||
return \true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!$this->propertyFetchAnalyzer->isPropertyFetch($expr)) {
|
||||
return $this->exprAnalyzer->isNonTypedFromParam($expr);
|
||||
}
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'a4c489ee0914233600f93379edee4932ce2d4ee4';
|
||||
public const PACKAGE_VERSION = '95a145f9311826749ea9e72f44c3a3adb2a030f3';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2025-02-05 11:37:04';
|
||||
public const RELEASE_DATE = '2025-02-05 15:47:13';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user