mirror of
https://github.com/rectorphp/rector.git
synced 2025-03-13 20:12:07 +01:00
Updated Rector to commit 50f9d87ff26cc0951921c42b1a7cd18ad714604d
50f9d87ff2
Simplify NodeTypeResolver (#6728)
This commit is contained in:
parent
688061fe87
commit
c3ba40b653
@ -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
|
||||
*/
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user