Updated Rector to commit 68c42e7e843bfb9fde2b6516bb1bb76648d67045

68c42e7e84 [DeadCode] Skip Remove @return/@param null functionality in case of sub type (#5350)
This commit is contained in:
Tomas Votruba 2023-12-10 16:34:14 +00:00
parent fffe49e4aa
commit d2dde21bd9
3 changed files with 2 additions and 24 deletions

View File

@ -62,10 +62,6 @@ final class DeadParamTagValueNodeAnalyzer
if (!$param instanceof Param) {
return \false;
}
// param null is always dead
if ($this->isNullTagValueNode($paramTagValueNode)) {
return \true;
}
if ($param->type === null) {
return \false;
}
@ -89,11 +85,4 @@ final class DeadParamTagValueNodeAnalyzer
}
return !$this->genericTypeNodeAnalyzer->hasGenericType($paramTagValueNode->type);
}
private function isNullTagValueNode(ParamTagValueNode $paramTagValueNode) : bool
{
if (!$paramTagValueNode->type instanceof IdentifierTypeNode) {
return \false;
}
return (string) $paramTagValueNode->type === 'null';
}
}

View File

@ -68,10 +68,6 @@ final class DeadReturnTagValueNodeAnalyzer
public function isDead(ReturnTagValueNode $returnTagValueNode, $functionLike) : bool
{
$returnType = $functionLike->getReturnType();
if ($this->isNullTagValueNode($returnTagValueNode)) {
// return null is always unused
return \true;
}
if ($returnType === null) {
return \false;
}
@ -153,11 +149,4 @@ final class DeadReturnTagValueNodeAnalyzer
}
return !$this->isNeverReturnType($returnType);
}
private function isNullTagValueNode(ReturnTagValueNode $returnTagValueNode) : bool
{
if (!$returnTagValueNode->type instanceof IdentifierTypeNode) {
return \false;
}
return (string) $returnTagValueNode->type === 'null';
}
}

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '287eab3a7040f8d42fa10701d5fbfc2998fdcc25';
public const PACKAGE_VERSION = '68c42e7e843bfb9fde2b6516bb1bb76648d67045';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2023-12-10 17:30:26';
public const RELEASE_DATE = '2023-12-10 17:31:56';
/**
* @var int
*/