diff --git a/src/types.php b/src/types.php index 6972b90..96a617a 100644 --- a/src/types.php +++ b/src/types.php @@ -213,7 +213,7 @@ public static function intersection(Type ...$types): Type 0 => self::never, 1 => $types[array_key_first($types)], /** @phpstan-ignore argument.type */ - default => new UnionType(array_values($types)), + default => new IntersectionType(array_values($types)), }; }