Skip to content

Commit 47ebefc

Browse files
committed
Update parser to tap author to set the username to the array key
Normalizes the API
1 parent faa6414 commit 47ebefc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/framework/src/Foundation/Concerns/HasKernelData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function authors(): Collection
5050
protected function parseConfigurationAuthors(Collection $authors): Collection
5151
{
5252
return $authors->mapWithKeys(function (PostAuthor $author, string $username): array {
53-
return [$username ?: $author->username => $author];
53+
return [$username => tap($author, fn (PostAuthor $author) => $author->username = $username)];
5454
});
5555
}
5656
}

0 commit comments

Comments
 (0)