1
0
Fork 0

Fix return type

pull/10542/head
Jordi Boggiano 2022-02-16 13:30:54 +01:00
parent 28ec4fa7b0
commit 53810b0cfb
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 7 additions and 2 deletions

View File

@ -691,11 +691,16 @@ EOT
/**
* @param string $author
*
* @return array<int, array{name: string, email: string|null}>
* @return array<int, array{name: string, email?: string}>
*/
protected function formatAuthors($author)
{
return array(array_filter($this->parseAuthorString($author), 'is_string'));
$author = $this->parseAuthorString($author);
if (null === $author['email']) {
unset($author['email']);
}
return array($author);
}
/**