mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
Updated Rector to commit d1ed5f03202cb9325f861ac7b8c1976173b45826
d1ed5f0320
[php84] Clean up contains null check type on ExplicitNullableParamTypeRector (#5726)
This commit is contained in:
parent
ae50c0e5a3
commit
9ab2b8bc07
@ -6,7 +6,6 @@ namespace Rector\Php84\Rector\Param;
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Expr\ConstFetch;
|
||||
use PhpParser\Node\Param;
|
||||
use PHPStan\Type\NullType;
|
||||
use PHPStan\Type\TypeCombinator;
|
||||
use Rector\PhpParser\Node\Value\ValueResolver;
|
||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||
@ -62,11 +61,7 @@ CODE_SAMPLE
|
||||
return null;
|
||||
}
|
||||
$nodeType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($node->type);
|
||||
if ($nodeType instanceof NullType) {
|
||||
return null;
|
||||
}
|
||||
$removedNullNodeType = TypeCombinator::removeNull($nodeType);
|
||||
if (!$nodeType->equals($removedNullNodeType)) {
|
||||
if (TypeCombinator::containsNull($nodeType)) {
|
||||
return null;
|
||||
}
|
||||
$newNodeType = TypeCombinator::addNull($nodeType);
|
||||
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = 'cdde425c2224a1357d70d6784936fe47fe3ffee0';
|
||||
public const PACKAGE_VERSION = 'd1ed5f03202cb9325f861ac7b8c1976173b45826';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-03-15 20:22:53';
|
||||
public const RELEASE_DATE = '2024-03-16 08:26:52';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user