| 1 | <?php |
||
| 16 | class SubnetUser |
||
| 17 | { |
||
| 18 | const DEFAULT_ID = 10; |
||
| 19 | const ROLE_SUBNET = 'ROLE_GRAVITON_SUBNET_USER'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var int |
||
| 23 | */ |
||
| 24 | private $id; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $username; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Constructor of the class. |
||
| 33 | * |
||
| 34 | * @param string $username Name of the user |
||
| 35 | */ |
||
| 36 | public function __construct($username) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Returns the username used to authenticate the user. |
||
| 44 | * |
||
| 45 | * @return string The username |
||
| 46 | */ |
||
| 47 | public function getUsername() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @param int $id id |
||
| 54 | * @return void |
||
| 55 | */ |
||
| 56 | public function setId($id) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return int |
||
| 63 | */ |
||
| 64 | public function getId() |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return array |
||
|
|
|||
| 71 | */ |
||
| 72 | public function getRoles() |
||
| 76 | } |
||
| 77 |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.