Updated Rector to commit 50f9d87ff26cc0951921c42b1a7cd18ad714604d

50f9d87ff2 Simplify NodeTypeResolver (#6728)
This commit is contained in:
Tomas Votruba 2025-02-10 14:06:26 +00:00
parent 688061fe87
commit c3ba40b653
3 changed files with 5 additions and 8 deletions

View File

@ -19,12 +19,12 @@ final class VersionResolver
* @api
* @var string
*/
public const PACKAGE_VERSION = '10180102a24697c63564755d9ea57860f8e98375';
public const PACKAGE_VERSION = '50f9d87ff26cc0951921c42b1a7cd18ad714604d';
/**
* @api
* @var string
*/
public const RELEASE_DATE = '2025-02-10 19:13:58';
public const RELEASE_DATE = '2025-02-10 21:03:47';
/**
* @var int
*/

View File

@ -8,10 +8,7 @@ use PHPStan\Type\StringType;
use PHPStan\Type\Type;
final class AccessoryNonEmptyStringTypeCorrector
{
/**
* @return \PHPStan\Type\Type|\PHPStan\Type\IntersectionType
*/
public function correct(Type $mainType)
public function correct(Type $mainType) : Type
{
if (!$mainType instanceof IntersectionType) {
return $mainType;

View File

@ -356,9 +356,9 @@ final class NodeTypeResolver
}
}
if ($hasChanged) {
return $this->accessoryNonEmptyStringTypeCorrector->correct(new UnionType($types));
return new UnionType($types);
}
return $this->accessoryNonEmptyStringTypeCorrector->correct($unionType);
return $unionType;
}
private function isMatchObjectWithoutClassType(ObjectWithoutClassType $objectWithoutClassType, ObjectType $requiredObjectType) : bool
{