*/ private array $types; /** * @internal */ public function __construct( Reflector $reflector, ReflectionParameter|ReflectionMethod|ReflectionFunction|ReflectionEnum|ReflectionProperty $owner, UnionType $type, ) { /** @var non-empty-list $types */ $types = array_map(static function (Identifier|Name|IntersectionType $type) use ($reflector, $owner): ReflectionNamedType|ReflectionIntersectionType { $type = ReflectionType::createFromNode($reflector, $owner, $type); assert($type instanceof ReflectionNamedType || $type instanceof ReflectionIntersectionType); return $type; }, $type->types); $this->types = $types; } /** * @internal */ public function withOwner(ReflectionParameter|ReflectionMethod|ReflectionFunction|ReflectionEnum|ReflectionProperty $owner): static { $clone = clone $this; foreach ($clone->types as $typeNo => $innerType) { $clone->types[$typeNo] = $innerType->withOwner($owner); } return $clone; } /** * @return non-empty-list */ public function getTypes(): array { return $this->types; } public function allowsNull(): bool { foreach ($this->types as $type) { if ($type->allowsNull()) { return true; } } return false; } /** * @return non-empty-string */ public function __toString(): string { return implode('|', array_map(static function (ReflectionType $type): string { if ($type instanceof ReflectionIntersectionType) { return sprintf('(%s)', $type->__toString()); } return $type->__toString(); }, $this->types)); } } __halt_compiler();----SIGNATURE:----N6mVT+WnVZhCz4sz3EIHLuq72ieOrzPRBf/lU1M7wH4Kbn1cR31cvl1Z1q4G9fl5trLHNA2rlw91mz2QktJK+/2Ei/HzJdphJyAH75bkGTfUCWIbZ8EtdmorOBA1sdymey4wGGAGbHYDjB4kKTap+w5b2X74nM4BPGvWODffmIa74jq0wKV1xsDZv38g45Eg6o/k+ujrl2ZZ2VYAhAwEtc+OHsxlGHN3WOUrgEIWuslyWIPGYd5MWQkmWYsGI/QDglOcXOxP1tpyPnYW417yUXaLWgIpTSmHHt/bR6wzjDmdSFmz/DzpuX38yUhIc1cVkKo3ghvQWygxvQR+Tg+YpRycXeT/pTpsrdSfmphYBaeFrBb+kb48KklqWfmTFn/9jI0kBM5Q2kaZSR8iJS5Hj71LnIL+Zr3wPUcdFPbgUqCoLzQ19+TRx0ORWSNsnEL7oum4gmFb3zMvCd8m7tY4GJkmMiH6SoNLlIf7UeJJNzPUOs/m7VJZ5q25P9wtDkFHJeQrSv4Iei22pimO7raSh8crUe4kJCQ/+VxYA+djhiUNzGmgT0MOxPmAFzy9RTGu1z8L3iDhVN0PJgo7IrNpY1xVmzYP474Vx1Or2dLUPfE3gE+ahx0sLuXNrotgCrwcIJLcM2QMh5p14E/DKpkkPDVyvRAoNrFBJ13ohr50wf0=----ATTACHMENT:----MTQxODYyMzIzMTE5ODA1MSA2MzgzNTg5ODc4MTcwNzY0IDYyNjY2NDMyMTM1MDU5MDc=