/** * @return UnionType * Get a new type for each type in this union which is * the generic array version of this type. For instance, * 'int|float' will produce 'int[]|float[]'. */ public function asGenericArrayTypes() : UnionType { return new UnionType($this->type_set->map(function (Type $type) : Type { return $type->asGenericArrayType(); })); }