We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a4f3867 + ba4fe14 commit 0db2b88Copy full SHA for 0db2b88
src/Type/UnionType.php
@@ -329,7 +329,7 @@ public function describe(VerbosityLevel $level): string
329
} elseif ($type instanceof IntersectionType) {
330
$intersectionDescription = $type->describe($level);
331
if (str_contains($intersectionDescription, '&')) {
332
- $typeNames[] = sprintf('(%s)', $type->describe($level));
+ $typeNames[] = sprintf('(%s)', $intersectionDescription);
333
} else {
334
$typeNames[] = $intersectionDescription;
335
}
0 commit comments