Skip to content

Commit c290b85

Browse files
committed
Handle array type from Assurance attribute
Join array elements with | before storing in the assurance entry, supporting the new array form of the type parameter.
1 parent 676f79d commit c290b85

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

composer.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MethodMapBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
use Respect\Fluent\FluentResolver;
2525

2626
use function assert;
27+
use function implode;
2728
use function in_array;
29+
use function is_array;
2830
use function ucfirst;
2931

3032
/**
@@ -284,7 +286,7 @@ private function getAssuranceEntry(string $fqcn): array|null
284286
}
285287

286288
if ($assurance->type !== null) {
287-
$entry['type'] = $assurance->type;
289+
$entry['type'] = is_array($assurance->type) ? implode('|', $assurance->type) : $assurance->type;
288290
}
289291

290292
if ($parameterIndex !== null) {

0 commit comments

Comments
 (0)