Perfect use case for "match is", in the future... cc @IluTov
$rType = $this->property->getType();
return match(true) {
$rType instanceof \ReflectionUnionType => throw UnionTypesNotSupported::create($this->property),
$rType instanceof \ReflectionIntersectionType => throw IntersectionTypesNotSupported::create($this->property),
$rType instanceof \ReflectionNamedType => $rType->getName(),
};