diff --git a/rules/Php84/Rector/Param/ExplicitNullableParamTypeRector.php b/rules/Php84/Rector/Param/ExplicitNullableParamTypeRector.php index 800fb44c024..2e9a37cd4f8 100644 --- a/rules/Php84/Rector/Param/ExplicitNullableParamTypeRector.php +++ b/rules/Php84/Rector/Param/ExplicitNullableParamTypeRector.php @@ -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); diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 2fde9886c46..92f2e3a763e 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -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 */