Closed
Description
Hi,
When I run one of my projects over Scrutinizer I realized that the return type stated in the annotation of the method UserInterface::getRoles()
is Role[]
. This is correct, but most (if not all) examples return an array of strings instead. It works, but it just doesn't look right.
Have you considered to modify the annotation in the interface so it look like this?
interface UserInterface
{
/**
* Returns the roles granted to the user.
*
* <code>
* public function getRoles()
* {
* return array('ROLE_USER');
* }
* </code>
*
* [...]
*
* @return Role[]|array The user roles
*/
public function getRoles();
(notice the alternate return type in the @return
annotation)
Even the provided example returns an array of strings.
Metadata
Metadata
Assignees
Labels
No labels