mirror of https://github.com/rectorphp/rector.git
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;
|
||||||
use PhpParser\Node\Expr\ConstFetch;
|
use PhpParser\Node\Expr\ConstFetch;
|
||||||
use PhpParser\Node\Param;
|
use PhpParser\Node\Param;
|
||||||
use PHPStan\Type\NullType;
|
|
||||||
use PHPStan\Type\TypeCombinator;
|
use PHPStan\Type\TypeCombinator;
|
||||||
use Rector\PhpParser\Node\Value\ValueResolver;
|
use Rector\PhpParser\Node\Value\ValueResolver;
|
||||||
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
use Rector\PHPStanStaticTypeMapper\Enum\TypeKind;
|
||||||
|
@ -62,11 +61,7 @@ CODE_SAMPLE
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$nodeType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($node->type);
|
$nodeType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($node->type);
|
||||||
if ($nodeType instanceof NullType) {
|
if (TypeCombinator::containsNull($nodeType)) {
|
||||||
return null;
|
|
||||||
}
|
|
||||||
$removedNullNodeType = TypeCombinator::removeNull($nodeType);
|
|
||||||
if (!$nodeType->equals($removedNullNodeType)) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
$newNodeType = TypeCombinator::addNull($nodeType);
|
$newNodeType = TypeCombinator::addNull($nodeType);
|
||||||
|
|
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const PACKAGE_VERSION = 'cdde425c2224a1357d70d6784936fe47fe3ffee0';
|
public const PACKAGE_VERSION = 'd1ed5f03202cb9325f861ac7b8c1976173b45826';
|
||||||
/**
|
/**
|
||||||
* @api
|
* @api
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public const RELEASE_DATE = '2024-03-15 20:22:53';
|
public const RELEASE_DATE = '2024-03-16 08:26:52';
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue